- Jun 18, 2013
-
-
Nadav Rotem authored
llvm-svn: 184200
-
- Jun 17, 2013
-
-
Pekka Jaaskelainen authored
vectorizing loops with memory accesses to non-zero address spaces. It simply dropped the AS info. Fixes PR16306. llvm-svn: 184103
-
- May 31, 2013
-
-
Arnold Schwaighofer authored
Use ScalarEvolution's getBackedgeTakenCount API instead of getExitCount since that is really what we want to know. Using the more specific getExitCount was safe because we made sure that there is only one exiting block. No functionality change. llvm-svn: 183047
-
Arnold Schwaighofer authored
We check that instructions in the loop don't have outside users (except if they are reduction values). Unfortunately, we skipped this check for if-convertable PHIs. Fixes PR16184. llvm-svn: 183035
-
- May 29, 2013
-
-
NAKAMURA Takumi authored
llvm-svn: 182820
-
NAKAMURA Takumi authored
llvm-svn: 182819
-
- May 28, 2013
-
-
Paul Redmond authored
- llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic by making the root of additional loop metadata. - Loop::isAnnotatedParallel now looks for llvm.loop and associated llvm.mem.parallel_loop_access - document llvm.loop and update llvm.mem.parallel_loop_access - add support for llvm.vectorizer.width and llvm.vectorizer.unroll - document llvm.vectorizer.* metadata - add utility class LoopVectorizerHints for getting/setting loop metadata - use llvm.vectorizer.width=1 to indicate already vectorized instead of already_vectorized - update existing tests that used llvm.loop.parallel and llvm.vectorizer.already_vectorized Reviewed by: Nadav Rotem llvm-svn: 182802
-
- May 24, 2013
-
-
Benjamin Kramer authored
LoopVectorize: LoopSimplify can't canonicalize loops with an indirectbr in it, don't assert on those cases. Fixes PR16139. llvm-svn: 182656
-
- May 22, 2013
-
-
Nadav Rotem authored
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
-
Arnold Schwaighofer authored
The Value pointers we store in the induction variable list can be RAUW'ed by a call to SCEVExpander::expandCodeFor, use a TrackingVH instead. Do the same thing in some other places where we store pointers that could potentially be RAUW'ed. Fixes PR16073. llvm-svn: 182485
-
- May 18, 2013
-
-
Arnold Schwaighofer authored
We might encouter single edge PHIs - handle them with an identity select. Fixes PR15990. llvm-svn: 182199
-
- May 17, 2013
-
-
Benjamin Kramer authored
llvm-svn: 182100
-
- May 16, 2013
-
-
Arnold Schwaighofer authored
We only want to check this once, not for every conditional block in the loop. No functionality change (except that we don't perform a check redudantly anymore). llvm-svn: 181942
-
- May 15, 2013
-
-
Arnold Schwaighofer authored
No functionality change. llvm-svn: 181862
-
Arnold Schwaighofer authored
InstCombine can be uncooperative to vectorization and sink loads into conditional blocks. This prevents vectorization. Undo this optimization if there are unconditional memory accesses to the same addresses in the loop. radar://13815763 llvm-svn: 181860
-
- May 14, 2013
-
-
Arnold Schwaighofer authored
We used to give up if we saw two integer inductions. After this patch, we base further induction variables on the chosen one like we do in the reverse induction and pointer induction case. Fixes PR15720. radar://13851975 llvm-svn: 181746
-
- May 13, 2013
-
-
Duncan Sands authored
read in asserts. llvm-svn: 181689
-
Nadav Rotem authored
llvm-svn: 181684
-
Nadav Rotem authored
The external user does not have to be in lane #0. We have to save the lane for each scalar so that we know which vector lane to extract. llvm-svn: 181674
-
Nadav Rotem authored
SLPVectorizer: Clear the map that maps between scalars to vectors after each round of vectorization. Testcase in the next commit. llvm-svn: 181673
-
- May 12, 2013
-
-
Arnold Schwaighofer authored
Use the widest induction type encountered for the cannonical induction variable. We used to turn the following loop into an empty loop because we used i8 as induction variable type and truncated 1024 to 0 as trip count. int a[1024]; void fail() { int reverse_induction = 1023; unsigned char forward_induction = 0; while ((reverse_induction) >= 0) { forward_induction++; a[reverse_induction] = forward_induction; --reverse_induction; } } radar://13862901 llvm-svn: 181667
-
Arnold Schwaighofer authored
No functionality change intended. llvm-svn: 181666
-
Arnold Schwaighofer authored
No functionality change intended. llvm-svn: 181665
-
- May 11, 2013
-
-
Nadav Rotem authored
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
-
Nadav Rotem authored
llvm-svn: 181647
-
- May 09, 2013
-
-
Arnold Schwaighofer authored
A computable loop exit count does not imply the presence of an induction variable. Scalar evolution can return a value for an infinite loop. Fixes PR15926. llvm-svn: 181495
-
- May 07, 2013
-
-
Arnold Schwaighofer authored
The two nested loops were confusing and also conservative in identifying reduction variables. This patch replaces them by a worklist based approach. llvm-svn: 181369
-
Arnold Schwaighofer authored
We were passing an i32 to ConstantInt::get where an i64 was needed and we must also pass the sign if we pass negatives numbers. The start index passed to getConsecutiveVector must also be signed. Should fix PR15882. llvm-svn: 181286
-
- May 06, 2013
-
-
Nadav Rotem authored
llvm-svn: 181178
-
- May 05, 2013
-
-
Benjamin Kramer authored
llvm-svn: 181157
-
Arnold Schwaighofer authored
Add support for min/max reductions when "no-nans-float-math" is enabled. This allows us to assume we have ordered floating point math and treat ordered and unordered predicates equally. radar://13723044 llvm-svn: 181144
-
Arnold Schwaighofer authored
No need for setting the operands. The pointers are going to be bound by the matcher. radar://13723044 llvm-svn: 181142
-
Arnold Schwaighofer authored
We can just use the initial element that feeds the reduction. max(max(x, y), z) == max(max(x,y), max(x,z)) radar://13723044 llvm-svn: 181141
-
Dmitri Gribenko authored
Patch by Robert Wilhelm. llvm-svn: 181138
-
- May 03, 2013
-
-
Nadav Rotem authored
By supporting the vectorization of PHINodes with more than two incoming values we can increase the complexity of nested if statements. We can now vectorize this loop: int foo(int *A, int *B, int n) { for (int i=0; i < n; i++) { int x = 9; if (A[i] > B[i]) { if (A[i] > 19) { x = 3; } else if (B[i] < 4 ) { x = 4; } else { x = 5; } } A[i] = x; } } llvm-svn: 181037
-
- May 01, 2013
-
-
Filip Pizlo authored
the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. llvm-svn: 180881
-
- Apr 30, 2013
-
-
Nadav Rotem authored
llvm-svn: 180806
-
- Apr 26, 2013
-
-
Nadav Rotem authored
LoopVectorizer: Calculate the number of pointers to disambiguate at runtime based on the numbers of reads and writes. llvm-svn: 180593
-
- Apr 25, 2013
-
-
Nadav Rotem authored
llvm-svn: 180570
-
- Apr 24, 2013
-
-
Arnold Schwaighofer authored
This makes it easier to read the code. No functionality change. llvm-svn: 180197
-