[PATCH 7/8] Model cache auto-prefetcher in scheduler

Jeff Law law@redhat.com
Fri Nov 14 17:51:00 GMT 2014


On 11/14/14 08:12, Maxim Kuvyrkov wrote:
> ...
>> Can this be built on top of Bin's work for insn fusion?  There's a
>> lot of commonality in the structure of the insns you care about.
>> He's already got a nice little priority function that I think you
>> could utilize to to ensure the insns with smaller offsets fire
>> first.
>
> I would argue that macro-fusion should have been implemented the way
> autopref_model is -- via
> targetm.sched.first_cycle_multipass_dfa_lookahead_guard hook.  To
> implement the autopref model I cleaned up and generalized existing
> infrastructure (max_issue and dfa_lookahead_guard hook) instead of
> adding yet another decision-making primitive to the scheduler.
Fair enough.  We can put unifying the two implementations on the queue 
for next stage 1.

>
>>
>>
>> My biggest concern would be sched2 coming along and undoing that
>> work since you're not going to fuse those into move-multiple types
>> of instructions.
>
> The autoprefetcher will be active only during sched2.  It is disabled
> during sched1 by the fact that max_issue is not used when scheduling
> for register pressure.
Sorry, should have been clearer, that comment was in reference to using 
the fusion stuff to handle prefetching.  It was not in reference to your 
change.

Vlad's approval and my questions crossed last night, I don't have any 
objections to this going in, though I do want us to look at unifying the 
memory pairing and prefetching stuff during the next stage1.

Jeff



More information about the Gcc-patches mailing list