summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/VecUtils.h
Commit message (Collapse)AuthorAgeFilesLines
* SLP Vectorizer: Implement multi-block slp-vectorization.Nadav Rotem2013-06-221-194/+0
| | | | | | | | | Rewrote the SLP-vectorization as a whole-function vectorization pass. It is now able to vectorize chains across multiple basic blocks. It still does not vectorize PHIs, but this should be easy to do now that we scan the entire function. I removed the support for extracting values from trees. We are now able to vectorize more programs, but there are some serious regressions in many workloads (such as flops-6 and mandel-2). llvm-svn: 184647
* Clang-format the SLP vectorizer. No functionality change.Nadav Rotem2013-06-201-21/+27
| | | | llvm-svn: 184446
* SLPVectorization: Add a basic support for cross-basic block slp vectorization.Nadav Rotem2013-06-201-2/+5
| | | | | | | We collect gather sequences when we vectorize basic blocks. Gather sequences are excellent hints for vectorization of other basic blocks. llvm-svn: 184444
* Document the return value and fix a typo.Nadav Rotem2013-06-191-1/+2
| | | | llvm-svn: 184281
* Add a return value to make this function more useful.Nadav Rotem2013-06-181-1/+1
| | | | llvm-svn: 184200
* SLPVectorizer: Change the order in which new instructions are added to the ↵Nadav Rotem2013-05-221-5/+20
| | | | | | | | | | | | function. We are not working on a DAG and I ran into a number of problems when I enabled the vectorizations of 'diamond-trees' (trees that share leafs). * Imroved the numbering API. * Changed the placement of new instructions to the last root. * Fixed a bug with external tree users with non-zero lane. * Fixed a bug in the placement of in-tree users. llvm-svn: 182508
* 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