This is the mail archive of the 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]

[RFC] Don't schedule prefetch INSNs


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?



2009-05-19  Andreas Krebbel  <>

	* 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);
+     case PREFETCH:
+       reg_pending_barrier = TRUE_BARRIER;
+       break;
        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]