summaryrefslogtreecommitdiff
path: root/docs/Vectorizers.rst
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2013-02-23 13:25:41 +0000
committerRenato Golin <renato.golin@linaro.org>2013-02-23 13:25:41 +0000
commitabafaba4d546352d37f8ccae895b0234b6c735f2 (patch)
treeec1c5306d953c9339982c37af52278e99942d053 /docs/Vectorizers.rst
parent4ff470e608ce5483dd011674acef7808c0c6bc93 (diff)
downloadllvm-abafaba4d546352d37f8ccae895b0234b6c735f2.tar.gz
llvm-abafaba4d546352d37f8ccae895b0234b6c735f2.tar.bz2
llvm-abafaba4d546352d37f8ccae895b0234b6c735f2.tar.xz
Add global structure vectorization to docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175965 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Vectorizers.rst')
-rw-r--r--docs/Vectorizers.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/Vectorizers.rst b/docs/Vectorizers.rst
index 07486347e3..0894b1eb3f 100644
--- a/docs/Vectorizers.rst
+++ b/docs/Vectorizers.rst
@@ -206,6 +206,25 @@ vectorization is profitable.
A[i] += 4 * B[i];
}
+Global Structures Alias Analysis
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Access to global structures can also be vectorized, with alias analysis being
+used to make sure accesses don't alias. Run-time checks can also be added on
+pointer access to structure members.
+
+Many variations are supported, but some that rely on undefined behaviour being
+ignored (as other compilers do) are still being left un-vectorized.
+
+.. code-block:: c++
+
+ struct { int A[100], K, B[100]; } Foo;
+
+ int foo() {
+ for (int i = 0; i < 100; ++i)
+ Foo.A[i] = Foo.B[i] + 100;
+ }
+
Vectorization of function calls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^