[llvm-commits] CVS: llvm/docs/LangRef.html

Chris Lattner lattner at cs.uiuc.edu
Mon Feb 28 11:24:35 PST 2005



Changes in directory llvm/docs:

LangRef.html updated: 1.85 -> 1.86
---
Log message:

Document llvm.prefetch, patch contributed by Justin Wick!


---
Diffs of the changes:  (+48 -1)

 LangRef.html |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 insertions(+), 1 deletion(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.85 llvm/docs/LangRef.html:1.86
--- llvm/docs/LangRef.html:1.85	Fri Feb 18 20:22:14 2005
+++ llvm/docs/LangRef.html	Mon Feb 28 13:24:19 2005
@@ -125,6 +125,7 @@
         <ol>
           <li><a href="#i_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a></li>
           <li><a href="#i_frameaddress">'<tt>llvm.frameaddress</tt>'   Intrinsic</a></li>
+          <li><a href="#i_prefetch">'<tt>llvm.prefetch</tt>' Intrinsic</a></li>
         </ol>
       </li>
       <li><a href="#int_os">Operating System Intrinsics</a>
@@ -2499,6 +2500,52 @@
 </p>
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="i_prefetch">'<tt>llvm.prefetch</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+  call void (sbyte *, uint, uint)* %llvm.prefetch(sbyte * <address>,
+                                                  uint <rw>, 
+                                                  uint <locality>)
+</pre>
+
+<h5>Overview:</h5>
+
+
+<p>
+The '<tt>llvm.prefetch</tt>' intrinsic is a hint to the code generator to insert
+a prefetch instruction if supported, otherwise it is a noop.  Prefetches have no
+behavior affect on the program, but can change the performance characteristics
+of the code.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+<tt>address</tt> is the address to be prefetched, <tt>rw</tt> is the specifier
+determining if the fetch should be for a read (0) or write (1), and
+<tt>locality</tt> is a temporal locality specifier ranging from (0) - no
+locality, to (3) - exteremely local keep in cache.  The <tt>rw</tt> and
+<tt>locality</tt> arguments must be constant integers.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+This intrinsic does not modify the behavior of the program.  In particular,
+prefetches cannot trap and do not produce a value.  On targets that support this
+intrinsic, the prefetch can provide hints to the processor cache for better
+performance.
+</p>
+
+</div>
+
+
 <!-- ======================================================================= -->
 <div class="doc_subsection">
   <a name="int_os">Operating System Intrinsics</a>
@@ -2924,7 +2971,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2005/02/19 02:22:14 $
+  Last modified: $Date: 2005/02/28 19:24:19 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list