diff options
author | Renato Golin <renato.golin@linaro.org> | 2013-02-23 13:25:41 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2013-02-23 13:25:41 +0000 |
commit | f2ea19ea2e7f426b0d2de973311464b3e0d3ad2b (patch) | |
tree | 6e42b5b22f0561f0ae7634a5fbace18e1e4b29ef /llvm/docs/Vectorizers.rst | |
parent | 0890ace58ad219d5dbc967f698df6e26c597286b (diff) | |
download | bcm5719-llvm-f2ea19ea2e7f426b0d2de973311464b3e0d3ad2b.tar.gz bcm5719-llvm-f2ea19ea2e7f426b0d2de973311464b3e0d3ad2b.zip |
Add global structure vectorization to docs
llvm-svn: 175965
Diffstat (limited to 'llvm/docs/Vectorizers.rst')
-rw-r--r-- | llvm/docs/Vectorizers.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/docs/Vectorizers.rst b/llvm/docs/Vectorizers.rst index 07486347e37..0894b1eb3f1 100644 --- a/llvm/docs/Vectorizers.rst +++ b/llvm/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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |