summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.html
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2012-02-10 18:13:54 +0000
committerPete Cooper <peter_cooper@apple.com>2012-02-10 18:13:54 +0000
commit13e082d8ba9df7d583482efe91b561cbacc50f29 (patch)
treeb8025da076091914ed6044b82ffa4ec84080eddf /llvm/docs/LangRef.html
parenta1bffa26ca7770475d8c45365a7d3a0c823d7f1d (diff)
downloadbcm5719-llvm-13e082d8ba9df7d583482efe91b561cbacc50f29.tar.gz
bcm5719-llvm-13e082d8ba9df7d583482efe91b561cbacc50f29.zip
Added description of invariant.load metadata to LangRef. It was added to the compiler in r144100
llvm-svn: 150257
Diffstat (limited to 'llvm/docs/LangRef.html')
-rw-r--r--llvm/docs/LangRef.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html
index a71cbfc0927..e3971ffed0d 100644
--- a/llvm/docs/LangRef.html
+++ b/llvm/docs/LangRef.html
@@ -4681,7 +4681,7 @@ IfUnequal:
<h5>Syntax:</h5>
<pre>
- &lt;result&gt; = load [volatile] &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;][, !nontemporal !&lt;index&gt;]
+ &lt;result&gt; = load [volatile] &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;][, !nontemporal !&lt;index&gt;][, !invariant.load !&lt;index&gt;]
&lt;result&gt; = load atomic [volatile] &lt;ty&gt;* &lt;pointer&gt; [singlethread] &lt;ordering&gt;, align &lt;alignment&gt;
!&lt;index&gt; = !{ i32 1 }
</pre>
@@ -4726,6 +4726,14 @@ IfUnequal:
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 &lt;index&gt; 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
OpenPOWER on IntegriCloud