summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/VecUtils.h
Commit message (Collapse)AuthorAgeFilesLines
* SLPVectorizer: Add support for trees with external users.Nadav Rotem2013-05-101-0/+5
| | | | | | | | | | | | | For example: bar() { int a = A[i]; int b = A[i+1]; B[i] = a; B[i+1] = b; foo(a); <--- a is used outside the vectorized expression. } llvm-svn: 181648
* SLPVectorizer: Strength reduce SmallVectors to ArrayRefs.Benjamin Kramer2013-04-201-13/+13
| | | | | | Avoids a couple of copies and allows more flexibility in the clients. llvm-svn: 179935
* SLPVectorizer: Improve the cost model for loop invariant broadcast values.Nadav Rotem2013-04-201-2/+4
| | | | llvm-svn: 179930
* Fix the header comment.Nadav Rotem2013-04-201-1/+1
| | | | llvm-svn: 179928
* SLPVectorizer: Make it a function pass and add code for hoisting the ↵Nadav Rotem2013-04-151-12/+25
| | | | | | vector-gather sequence out of loops. llvm-svn: 179562
* Miscellaneous cleanups for VecUtils.hBenjamin Kramer2013-04-141-9/+6
| | | | llvm-svn: 179483
* SLPVectorizer: Add support for trees that don't start at binary operators, ↵Nadav Rotem2013-04-141-1/+6
| | | | | | and add the cost of extracting values from the roots of the tree. llvm-svn: 179475
* SLPVectorizer: add initial support for reduction variable vectorization.Nadav Rotem2013-04-141-0/+3
| | | | llvm-svn: 179470
* SLPVectorizer: add support for vectorization of diamond shaped trees. We now ↵Nadav Rotem2013-04-121-11/+47
| | | | | | perform a preliminary traversal of the graph to collect values with multiple users and check where the users came from. llvm-svn: 179414
* Add support for bottom-up SLP vectorization infrastructure.Nadav Rotem2013-04-091-0/+108
This commit adds the infrastructure for performing bottom-up SLP vectorization (and other optimizations) on parallel computations. The infrastructure has three potential users: 1. The loop vectorizer needs to be able to vectorize AOS data structures such as (sum += A[i] + A[i+1]). 2. The BB-vectorizer needs this infrastructure for bottom-up SLP vectorization, because bottom-up vectorization is faster to compute. 3. A loop-roller needs to be able to analyze consecutive chains and roll them into a loop, in order to reduce code size. A loop roller does not need to create vector instructions, and this infrastructure separates the chain analysis from the vectorization. This patch also includes a simple (100 LOC) bottom up SLP vectorizer that uses the infrastructure, and can vectorize this code: void SAXPY(int *x, int *y, int a, int i) { x[i] = a * x[i] + y[i]; x[i+1] = a * x[i+1] + y[i+1]; x[i+2] = a * x[i+2] + y[i+2]; x[i+3] = a * x[i+3] + y[i+3]; } llvm-svn: 179117
OpenPOWER on IntegriCloud