[LLVMdev] specializing hybrid_ls_rr_sort (was: Re: Bottom-Up Scheduling?)

Andrew Trick atrick at apple.com
Tue Dec 20 08:21:09 PST 2011


On Dec 19, 2011, at 11:20 PM, Andrew Trick wrote:

> 
> On Dec 19, 2011, at 10:53 PM, Hal Finkel wrote:
> 
>> Here's my "thought experiment" (from PR11589): I have a bunch of
>> load-fadd-store chains to schedule. A store takes two cycles to clear
>> its last pipeline stage. The fadd takes longer to compute its result
>> (say 5 cycles), but can sustain a rate of 1 independent add per cycle.
>> As the scheduling is bottom-up, it will schedule a store, then it has a
>> choice: it can schedule another store (at a 1 cycle penalty), or it can
>> schedule the fadd associated with the store it just scheduled (with a 4
>> cycle penalty due to operand latency). It seems that the current hybrid
>> scheduler will choose the fadd, I want a scheduler that will make the
>> opposite choice.
> 
> That's just wrong. You may need to look at -debug-only=pre-RA-sched and debug your itinerary.
> 
> -Andy


Wait… if you're using "sched=ilp" then register pressure avoidance is the primary heuristic. So, yes, it will schedule each chain individually as long as the critical path is not *too* long.

sched=hybrid will only behave like this when it determines that register pressure is high. You  have to make sure that the register pressure limit is implemented properly for your target. debug-only=pre-RA-sched will show you the number of locally live register out of the total available each time an instruction is scheduled.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111220/a33695e9/attachment.html>


More information about the llvm-dev mailing list