Hi Chenwj,<br><br>The prefetch intrinsic in llvm seems to be useful for only data prefetching i.e data into d-cache. When I try to prefetch instructions into i-cache, it does not work. Would you know anything about how to resolve this issue?<br>
<br><div class="gmail_quote">On Thu, Dec 13, 2012 at 5:11 AM, ³¯³¥ô (Wei-Ren Chen) <span dir="ltr"><<a href="mailto:chenwj@iis.sinica.edu.tw" target="_blank">chenwj@iis.sinica.edu.tw</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Dec 12, 2012 at 07:09:45PM -0500, aasheesh kolli wrote:<br>
> HI,<br>
><br>
> Has anyone ever implemented instruction prefetching with llvm? If so, on which<br>
> architectures?<br>
<br>
</div> Grep prefetch in lib/Target/* will show you ARM, X86, and PPC seems<br>
have implemented prefetch instruction. LLVM provides prefetch intrinsic<br>
[1] so that you can insert it in LLVM IR as a hint to code generator.<br>
I guess you need to write a pass to lower the intrinsic call to your<br>
target code.<br>
<br>
HTH,<br>
chenwj<br>
<br>
[1] <a href="http://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic" target="_blank">http://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Wei-Ren Chen (³¯³¥ô)<br>
Computer Systems Lab, Institute of Information Science,<br>
Academia Sinica, Taiwan (R.O.C.)<br>
Tel:886-2-2788-3799 #1667<br>
Homepage: <a href="http://people.cs.nctu.edu.tw/%7Echenwj" target="_blank">http://people.cs.nctu.edu.tw/~chenwj</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><br>Thanks,<br>Aasheesh<br><br>