summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-11-11 06:47:51 +0000
committerNadav Rotem <nrotem@apple.com>2012-11-11 06:47:51 +0000
commitd324c48e5595235996aa2ddb08a331913f2037fd (patch)
tree14e0354db1bb1901b4df13376145a647079bd510
parentd7cb600514a1d85e88ae873633bb42357babbc68 (diff)
downloadexternal_llvm-d324c48e5595235996aa2ddb08a331913f2037fd.zip
external_llvm-d324c48e5595235996aa2ddb08a331913f2037fd.tar.gz
external_llvm-d324c48e5595235996aa2ddb08a331913f2037fd.tar.bz2
Update the vectorizer docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167688 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/ReleaseNotes.html24
1 files changed, 20 insertions, 4 deletions
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html
index 45a9cc5..fc3a8b7 100644
--- a/docs/ReleaseNotes.html
+++ b/docs/ReleaseNotes.html
@@ -473,15 +473,31 @@ Release Notes</a>.</h1>
<b>-mllvm -force-vector-width=4</b>.
The default value is <b>0</b> which means auto-select.
<br/>
- We can now vectorize this code:
+ We can now vectorize this function:
<pre class="doc_code">
- for (i=0; i&lt;n; i++) {
- a[i] = b[i+1] + c[i+3] + i;
- sum += d[i];
+ unsigned sum_arrays(int *A, int *B, int start, int end) {
+ unsigned sum = 0;
+ for (int i = start; i &lt; end; ++i)
+ sum += A[i] + B[i] + i;
+
+ return sum;
}
</pre>
+ We vectorize under the following loops:
+ <ul>
+ <li>The inner most loops must have a single basic block.</li>
+ <li>The number of iterations are known before the loop starts to execute.</li>
+ <li>The loop counter needs to be incrimented by one.</li>
+ <li>The loop trip count <b>can</b> be a variable.</li>
+ <li>Loops do <b>not</b> need to start at zero.</li>
+ <li>The induction variable can be used inside the loop.</li>
+ <li>Loop reductions are supported.</li>
+ <li>Arrays with affine access pattern do <b>not</b> need to be marked as 'noalias' and are checked at runtime.</li>
+ <li>...</li>
+ </ul>
+
</p>
<p>SROA - We've re-written SROA to be significantly more powerful.