[LLVMdev] Adjusting Load Latencies

Andrew Trick atrick at apple.com
Fri Mar 2 15:27:10 PST 2012


On Mar 2, 2012, at 2:59 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
>> If you annotate loads with their expected latency, the upcoming
>> MachineScheduler will be able to use the information. In the short
>> term (next couple months), you're free to hack the SDScheduler as
>> well.
> 
> Alright, sounds good. If I add metadata to the load, can I get to it
> thought the Value * in the associated MachineMemOperand object? 

AFAIK. I certainly don't have a problem with that approach. I've heard there's a preference for lowering information into self-contained machine code. But referring back to IR makes a lot of sense to me personally. If we ever want to serialize MIs I think we should serialize the IR with it.

> I'm afraid that "as many iterations ahead as possible" may turn out to
> be too few if I start at the very next iteration because the request
> buffer is small. Nevertheless, it is certainly worth a try.

It sounds like it's really important for you to avoid useless prefetches. This can be tricky. Other than that I don't see a way around your problem. Does it help to give your prefetches a head start? If your loop eats cache lines faster than you can feed it, eventually it will catch up.

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


More information about the llvm-dev mailing list