Patch for AMD Dispatch Scheduler

Andrew Pinski pinskia@gmail.com
Fri Aug 13 19:22:00 GMT 2010


On Fri, Aug 13, 2010 at 1:33 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> +/* Return true if INSN is a prefetch instruction.  */
> +static bool
> +is_prefetch (rtx insn)
> +{
> +  return ((strcmp (GET_RTX_NAME (GET_CODE (insn)), "prefetch_sse") == 0)
> +         || (strcmp (GET_RTX_NAME (GET_CODE (insn)),
> +                     "prefetch_sse_rex") == 0)
> +         || (strcmp (GET_RTX_NAME (GET_CODE (insn)),
> +                     "prefetch_3dnow") == 0)
> +         || (strcmp (GET_RTX_NAME (GET_CODE (insn)),
> +                     "prefetch_3dnow_rex") == 0));
> +}
>
> No! Please introduce "prefetch" type and handle it elsewhere instead
> of the call to is_prefetch. The names already changed in the
> mainline...


No need to introduce a "prefetch" type as they will contain a prefetch RTX.

You can do:
static bool
is_prefetch (rtx insn)
{
  return NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == PREFETCH;
}

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list