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: [RFC] Don't schedule prefetch INSNs


On Tue, May 19, 2009 at 5:21 PM, Andreas Krebbel
<krebbel@linux.vnet.ibm.com> wrote:
> Hi,
>
> I'm experimenting with prefetching instructions in the S/390 back-end
> and found it rather annoying that the instruction scheduler shuffles
> them around. ?Is that intended behaviour? ?When emitting a prefetch
> instruction I usually want it to reside exactly where I emitted it and
> especially don't want memory accesses to be moved over it. ?The
> attached patch fixes it for me. ?Does that make sense?

Isn't that a big hammer as it will also prevent unrelated accesses from
being scheduled?

Richard.

> Bye,
>
> -Andreas-
>
>
> 2009-05-19 ?Andreas Krebbel ?<krebbel1@de.ibm.com>
>
> ? ? ? ?* sched-deps.c (sched_analyze_2): Consider prefetch INSNs to be a
> ? ? ? ?scheduling barrier.
>
>
> Index: gcc/sched-deps.c
> ===================================================================
> *** gcc/sched-deps.c.orig ? ? ? 2009-02-26 08:43:06.000000000 +0100
> --- gcc/sched-deps.c ? ?2009-05-19 13:32:58.000000000 +0200
> *************** sched_analyze_2 (struct deps *deps, rtx
> *** 2132,2137 ****
> --- 2132,2141 ----
> ? ? ? ?flush_pending_lists (deps, insn, true, false);
> ? ? ? ?break;
>
> + ? ? case PREFETCH:
> + ? ? ? reg_pending_barrier = TRUE_BARRIER;
> + ? ? ? break;
> +
> ? ? ?case UNSPEC_VOLATILE:
> ? ? ? ?flush_pending_lists (deps, insn, true, true);
> ? ? ? ?/* FALLTHRU */
>


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