diff options
| author | David Green <david.green@arm.com> | 2018-07-19 12:37:00 +0000 |
|---|---|---|
| committer | David Green <david.green@arm.com> | 2018-07-19 12:37:00 +0000 |
| commit | 7fbf06c10ba87bc1e1856b38876303e0b11582b3 (patch) | |
| tree | 7f919e20a0b4fa7b24cbdfc9e86ebb15dbef364c /llvm/docs/Passes.rst | |
| parent | 7315d2d721508cc684371dc5495fb6007076b479 (diff) | |
| download | bcm5719-llvm-7fbf06c10ba87bc1e1856b38876303e0b11582b3.tar.gz bcm5719-llvm-7fbf06c10ba87bc1e1856b38876303e0b11582b3.zip | |
[UnJ] Document unroll and jam pass and loop metadata
Add some quick words for unroll and jam to the list of passes and add
unroll_and_jam metadata to the language ref.
Differential Revision: https://reviews.llvm.org/D49349
llvm-svn: 337448
Diffstat (limited to 'llvm/docs/Passes.rst')
| -rw-r--r-- | llvm/docs/Passes.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst index 39874e4c8a0..9ab214984d2 100644 --- a/llvm/docs/Passes.rst +++ b/llvm/docs/Passes.rst @@ -83,6 +83,8 @@ Yet to be written. A pass which can be used to count how many alias queries are being made and how the alias analysis implementation being used responds. +.. _passes-da: + ``-da``: Dependence Analysis ---------------------------- @@ -825,6 +827,27 @@ This pass implements a simple loop unroller. It works best when loops have been canonicalized by the :ref:`indvars <passes-indvars>` pass, allowing it to determine the trip counts of loops easily. +``-loop-unroll-and-jam``: Unroll and Jam loops +---------------------------------------------- + +This pass implements a simple unroll and jam classical loop optimisation pass. +It transforms loop from: + +.. code-block:: c++ + + for i.. i+= 1 for i.. i+= 4 + for j.. for j.. + code(i, j) code(i, j) + code(i+1, j) + code(i+2, j) + code(i+3, j) + remainder loop + +Which can be seen as unrolling the outer loop and "jamming" (fusing) the inner +loops into one. When variables or loads can be shared in the new inner loop, this +can lead to significant performance improvements. It uses +:ref:`Dependence Analysis <passes-da>` for proving the transformations are safe. + ``-loop-unswitch``: Unswitch loops ---------------------------------- |

