Nadav Rotem
cdfb48d2fe
SLPVectorizer: Add support for trees with external users.
...
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
2013-05-10 22:59:33 +00:00
Manman Ren
1a5ff287fd
TBAA: remove !tbaa from testing cases if not used.
...
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.
llvm-svn: 180796
2013-04-30 17:52:57 +00:00
Nadav Rotem
c57af326a4
SLPVectorize: Add support for vectorization of casts.
...
llvm-svn: 179975
2013-04-21 08:05:59 +00:00
Nadav Rotem
8aca44a623
Fix PR15800. Do not try to vectorize vectors and structs.
...
llvm-svn: 179960
2013-04-20 22:29:43 +00:00
Nadav Rotem
83c7c41bc2
SLPVectorizer: Improve the cost model for loop invariant broadcast values.
...
llvm-svn: 179930
2013-04-20 06:13:47 +00:00
Nadav Rotem
b9116e6966
SLPVectorizer: Make it a function pass and add code for hoisting the vector-gather sequence out of loops.
...
llvm-svn: 179562
2013-04-15 22:00:26 +00:00
Eric Christopher
13637e900e
Revert "Recommit r179497 after fixing uninitialized variable." until
...
I can fix the testcases here:
http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/6952
This reverts commit r179512 due to testcases specifying triples
that they didn't actually mean and causing failures on other platforms.
llvm-svn: 179513
2013-04-15 07:31:37 +00:00
Eric Christopher
fc2beaa136
Recommit r179497 after fixing uninitialized variable.
...
llvm-svn: 179512
2013-04-15 07:07:21 +00:00
Nadav Rotem
5d393c416f
SLPVectorizer: Add support for vectorizing trees that start at compare instructions.
...
llvm-svn: 179504
2013-04-15 04:25:27 +00:00
Eric Christopher
1f140317e3
Revert "Remove some unused triple and data layout."
...
This reverts commit r179497 and the accompanying commit as it broke random platforms that aren't osx.
llvm-svn: 179499
2013-04-14 23:35:36 +00:00
Eric Christopher
4eebd14ad0
Remove some unused triple and data layout.
...
llvm-svn: 179498
2013-04-14 23:32:44 +00:00
Nadav Rotem
6ebddae118
Make the command line triple match the module triple.
...
llvm-svn: 179492
2013-04-14 20:13:05 +00:00
Nadav Rotem
029208ceeb
Remove unused function attributes.
...
llvm-svn: 179476
2013-04-14 05:47:04 +00:00
Nadav Rotem
54b413d157
SLPVectorizer: Add support for trees that don't start at binary operators, and add the cost of extracting values from the roots of the tree.
...
llvm-svn: 179475
2013-04-14 05:15:53 +00:00
Nadav Rotem
0b9cf8567b
SLPVectorizer: add initial support for reduction variable vectorization.
...
llvm-svn: 179470
2013-04-14 03:22:20 +00:00
Nadav Rotem
8543ba3e52
SLPVectorizer: add support for vectorization of diamond shaped trees. We now perform a preliminary traversal of the graph to collect values with multiple users and check where the users came from.
...
llvm-svn: 179414
2013-04-12 21:16:54 +00:00
Nadav Rotem
73dffa4184
Make the SLP store-merger less paranoid about function calls. We check for function calls when we check if it is safe to sink instructions.
...
llvm-svn: 179207
2013-04-10 19:41:36 +00:00
Nadav Rotem
2d9dec322e
Add support for bottom-up SLP vectorization infrastructure.
...
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
2013-04-09 19:44:35 +00:00