[LLVMdev] Instruction Prefetching in llvm

aasheesh kolli aasheesh.kolli at gmail.com
Thu Dec 13 08:38:17 PST 2012


Hi Chenwj,

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?

On Thu, Dec 13, 2012 at 5:11 AM, 陳韋任 (Wei-Ren Chen) <
chenwj at iis.sinica.edu.tw> wrote:

> On Wed, Dec 12, 2012 at 07:09:45PM -0500, aasheesh kolli wrote:
> > HI,
> >
> > Has anyone ever implemented instruction prefetching with llvm? If so, on
> which
> > architectures?
>
>   Grep prefetch in lib/Target/* will show you ARM, X86, and PPC seems
> have implemented prefetch instruction. LLVM provides prefetch intrinsic
> [1] so that you can insert it in LLVM IR as a hint to code generator.
> I guess you need to write a pass to lower the intrinsic call to your
> target code.
>
> HTH,
> chenwj
>
> [1] http://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic
>
> --
> Wei-Ren Chen (陳韋任)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
> Homepage: http://people.cs.nctu.edu.tw/~chenwj
>



-- 

Thanks,
Aasheesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121213/4f3c21f7/attachment.html>


More information about the llvm-dev mailing list