mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Add global structure vectorization to docs
llvm-svn: 175965
This commit is contained in:
parent
d648db09a8
commit
87e7870bee
@ -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
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user