Skip to content

Commit

Permalink
Allow BBVectorize to form non-2^n-length vectors.
Browse files Browse the repository at this point in the history
The original algorithm only used recursive pair fusion of equal-length
types. This is now extended to allow pairing of any types that share
the same underlying scalar type. Because we would still generally
prefer the 2^n-length types, those are formed first. Then a second
set of iterations form the non-2^n-length types.

Also, a call to SimplifyInstructionsInBlock has been added after each
pairing iteration. This takes care of DCE (and a few other things)
that make the following iterations execute somewhat faster. For the
same reason, some of the simple shuffle-combination cases are now
handled internally.

There is some additional refactoring work to be done, but I've had
many requests for this feature, so additional refactoring will come
soon in future commits (as will additional test cases).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159330 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Hal Finkel committed Jun 28, 2012
1 parent ec4e85e commit 64e1b28
Show file tree
Hide file tree
Showing 4 changed files with 571 additions and 134 deletions.
3 changes: 3 additions & 0 deletions include/llvm/Transforms/Vectorize.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ struct VectorizeConfig {
/// @brief The maximum number of pairing iterations.
unsigned MaxIter;

/// @brief Don't try to form odd-length vectors.
bool Pow2LenOnly;

/// @brief Don't boost the chain-depth contribution of loads and stores.
bool NoMemOpBoost;

Expand Down
Loading

0 comments on commit 64e1b28

Please sign in to comment.