diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-04-14 05:15:53 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-04-14 05:15:53 +0000 |
commit | ab105ae95fc473c19d9f0b019fc7c7a16d17b1a5 (patch) | |
tree | 27247e73ffdef91c52268c935d65afd7c066c1c0 /lib/Transforms/Vectorize/VecUtils.h | |
parent | 618eda7a60bafff7741a988e27b98bf81d27cb89 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/VecUtils.h')
-rw-r--r-- | lib/Transforms/Vectorize/VecUtils.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/VecUtils.h b/lib/Transforms/Vectorize/VecUtils.h index f865236ff8..edebcb3e27 100644 --- a/lib/Transforms/Vectorize/VecUtils.h +++ b/lib/Transforms/Vectorize/VecUtils.h @@ -61,6 +61,11 @@ struct BoUpSLP { /// A negative number means that this is profitable. int getTreeCost(ValueList &VL); + /// \returns the scalarization cost for this ValueList. Assuming that this + /// subtree gets vectorized, we may need to extract the values from the + /// roots. This method calculates the cost of extracting the values. + int getScalarizationCost(ValueList &VL); + /// \brief Attempts to order and vectorize a sequence of stores. This /// function does a quadratic scan of the given stores. /// \returns true if the basic block was modified. @@ -118,7 +123,7 @@ private: /// by multiple lanes, or by users outside the tree. /// NOTICE: The vectorization methods also use this set. ValueSet MustScalarize; - + // Contains a list of values that are used outside the current tree. This // set must be reset between runs. ValueSet MultiUserVals; |