summaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-10-21 04:04:25 +0000
committerNadav Rotem <nrotem@apple.com>2012-10-21 04:04:25 +0000
commitf01cad69c1ab1b025c524d1ac16060b2cc0f4668 (patch)
tree36567385f45862908365f8c1d4db6356ce6da2ee /lib/Transforms/Vectorize
parent5a418ba5f5a6498a25d5eacb0f876d9f358c977b (diff)
downloadllvm-f01cad69c1ab1b025c524d1ac16060b2cc0f4668.tar.gz
llvm-f01cad69c1ab1b025c524d1ac16060b2cc0f4668.tar.bz2
llvm-f01cad69c1ab1b025c524d1ac16060b2cc0f4668.tar.xz
Document change. Describe the pass and some papers that inspired the design of the pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 76936d52c9..f32b66dbaf 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7,10 +7,14 @@
//
//===----------------------------------------------------------------------===//
//
-// This is a simple loop vectorizer. We currently only support single block
-// loops. We have a very simple and restrictive legality check: we need to read
-// and write from disjoint memory locations. We still don't have a cost model.
-// We do support integer reductions.
+// This is the LLVM loop vectorizer. This pass modifies 'vectorizable' loops
+// and generates target-independent LLVM-IR. Legalization of the IR is done
+// in the codegen. However, the vectorizes uses (will use) the codegen
+// interfaces to generate IR that is likely to result in an optimal binary.
+//
+// The loop vectorizer combines consecutive loop iteration into a single
+// 'wide' iteration. After this transformation the index is incremented
+// by the SIMD vector width, and not by one.
//
// This pass has three parts:
// 1. The main loop pass that drives the different parts.
@@ -18,6 +22,16 @@
// of the vectorization.
// 3. SingleBlockLoopVectorizer - A helper class that performs the actual
// widening of instructions.
+//===----------------------------------------------------------------------===//
+//
+// The reduction-variable vectorization is based on the paper:
+// D. Nuzman and R. Henderson. Multi-platform Auto-vectorization.
+//
+// Variable uniformity checks are inspired by:
+// Karrenberg, R. and Hack, S. Whole Function Vectorization.
+//
+// Other ideas/concepts are from:
+// A. Zaks and D. Nuzman. Autovectorization in GCC—two years later.
//
//===----------------------------------------------------------------------===//
#define LV_NAME "loop-vectorize"