This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: adding dependence from prefetch to load
George Caragea wrote:
So my initial question remains: is there any way to tell the scheduler
not to place the prefetch instruction after the actual read?
You can try changing sched_analyze_2 in sched-deps.c to handle PREFETCH
specially.
You could perhaps handle it similarly to how PRE_DEC is already handled,
except that you don't have a MEM here which is an unfortunate
complication. You probably have to create a MEM RTL in order to pass it
to sched_analyze_1.
Or you could try changing the representation of your prefetch insn rtl.
If you add an unspec_volatile to the pattern, you should get the
dependency you want.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com