[llvm] r175965 - Add global structure vectorization to docs
Renato Golin
renato.golin at linaro.org
Sat Feb 23 05:25:41 PST 2013
Author: rengolin
Date: Sat Feb 23 07:25:41 2013
New Revision: 175965
URL: http://llvm.org/viewvc/llvm-project?rev=175965&view=rev
Log:
Add global structure vectorization to docs
Modified:
llvm/trunk/docs/Vectorizers.rst
Modified: llvm/trunk/docs/Vectorizers.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Vectorizers.rst?rev=175965&r1=175964&r2=175965&view=diff
==============================================================================
--- llvm/trunk/docs/Vectorizers.rst (original)
+++ llvm/trunk/docs/Vectorizers.rst Sat Feb 23 07:25:41 2013
@@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
More information about the llvm-commits
mailing list