[LLVMdev] Use of llvm.prefetch intrinsic for basicblock prefetching

usha shau
Mon, 22 Sep 2014 12:01:20 -0000

Hi,

I am new to LLVM and using it for my project where I want to perform
software prefetching of code blocks.
I am not able to use the llvm.prefetch instruction to fetch a block of code
in instruction cache. The LangRef
<http://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic>manual mentions
that giving last argument as '0' performs prefetch on instruction cache.
However, I get the following error when I do that.

LLVM ERROR: Cannot select: 0x2a39348: ch = Prefetch 0x2a39030, 0x2a39138,
0x2a38c10, 0x2a39240, 0x2a38c10<LD1[%x1]> [ORD=9] [ID=15]
  0x2a39138: i64 = FrameIndex<1> [ID=4]
  0x2a38c10: i32 = Constant<0> [ID=1]
  0x2a39240: i32 = Constant<1> [ID=5]
  0x2a38c10: i32 = Constant<0> [ID=1]
In function: main

What does this error mean?
Can anyone please tell me if I can inform the processor to prefetch code to
instruction cache?

Thanks in advance.
Usha
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140922/c2d32105/attachment.html>