comparison docs/Vectorizers.rst @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents afa8332a0e37
children 3a76565eade5
comparison
equal deleted inserted replaced
120:1172e4bd9c6f 121:803732b1fca8
42 .. code-block:: console 42 .. code-block:: console
43 43
44 $ clang -mllvm -force-vector-width=8 ... 44 $ clang -mllvm -force-vector-width=8 ...
45 $ opt -loop-vectorize -force-vector-width=8 ... 45 $ opt -loop-vectorize -force-vector-width=8 ...
46 46
47 Users can control the unroll factor using the command line flag "-force-vector-unroll" 47 Users can control the unroll factor using the command line flag "-force-vector-interleave"
48 48
49 .. code-block:: console 49 .. code-block:: console
50 50
51 $ clang -mllvm -force-vector-unroll=2 ... 51 $ clang -mllvm -force-vector-interleave=2 ...
52 $ opt -loop-vectorize -force-vector-unroll=2 ... 52 $ opt -loop-vectorize -force-vector-interleave=2 ...
53 53
54 Pragma loop hint directives 54 Pragma loop hint directives
55 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 55 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 56
57 The ``#pragma clang loop`` directive allows loop vectorization hints to be 57 The ``#pragma clang loop`` directive allows loop vectorization hints to be
97 97
98 ``-Rpass-missed=loop-vectorize`` identifies loops that failed vectorization and 98 ``-Rpass-missed=loop-vectorize`` identifies loops that failed vectorization and
99 indicates if vectorization was specified. 99 indicates if vectorization was specified.
100 100
101 ``-Rpass-analysis=loop-vectorize`` identifies the statements that caused 101 ``-Rpass-analysis=loop-vectorize`` identifies the statements that caused
102 vectorization to fail. 102 vectorization to fail. If in addition ``-fsave-optimization-record`` is
103 provided, multiple causes of vectorization failure may be listed (this behavior
104 might change in the future).
103 105
104 Consider the following loop: 106 Consider the following loop:
105 107
106 .. code-block:: c++ 108 .. code-block:: c++
107 109
378 380
379 And Linpack-pc with the same configuration. Result is Mflops, higher is better. 381 And Linpack-pc with the same configuration. Result is Mflops, higher is better.
380 382
381 .. image:: linpack-pc.png 383 .. image:: linpack-pc.png
382 384
385 Ongoing Development Directions
386 ------------------------------
387
388 .. toctree::
389 :hidden:
390
391 Proposals/VectorizationPlan
392
393 :doc:`Proposals/VectorizationPlan`
394 Modeling the process and upgrading the infrastructure of LLVM's Loop Vectorizer.
395
383 .. _slp-vectorizer: 396 .. _slp-vectorizer:
384 397
385 The SLP Vectorizer 398 The SLP Vectorizer
386 ================== 399 ==================
387 400