[llvm-commits] [llvm] r150257 - /llvm/trunk/docs/LangRef.html

Pete Cooper peter_cooper at apple.com
Fri Feb 10 10:13:54 PST 2012


Author: pete
Date: Fri Feb 10 12:13:54 2012
New Revision: 150257

URL: http://llvm.org/viewvc/llvm-project?rev=150257&view=rev
Log:
Added description of invariant.load metadata to LangRef.  It was added to the compiler in r144100

Modified:
    llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=150257&r1=150256&r2=150257&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Fri Feb 10 12:13:54 2012
@@ -4681,7 +4681,7 @@
 
 <h5>Syntax:</h5>
 <pre>
-  <result> = load [volatile] <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>]
+  <result> = load [volatile] <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.load !<index>]
   <result> = load atomic [volatile] <ty>* <pointer> [singlethread] <ordering>, align <alignment>
   !<index> = !{ i32 1 }
 </pre>
@@ -4726,6 +4726,14 @@
    The code generator may select special instructions to save cache bandwidth,
    such as the <tt>MOVNT</tt> instruction on x86.</p>
 
+<p>The optional <tt>!invariant.load</tt> metadata must reference a single
+   metatadata name <index> corresponding to a metadata node with no
+   entries.  The existence of the <tt>!invariant.load</tt> metatadata on the
+   instruction tells the optimizer and code generator that this load address
+   points to memory which does not change value during program execution.
+   The optimizer may then move this load around, for example, by hoisting it
+   out of loops using loop invariant code motion.</p>
+
 <h5>Semantics:</h5>
 <p>The location of memory pointed to is loaded.  If the value being loaded is of
    scalar type then the number of bytes read does not exceed the minimum number





More information about the llvm-commits mailing list