summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/VecUtils.h
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-04-14 05:15:53 +0000
committerNadav Rotem <nrotem@apple.com>2013-04-14 05:15:53 +0000
commit54b413d157cb22ce949db12c3cdcfe997355f3d5 (patch)
treeb4d0140e1cc614332a13668a958d11a1945937e3 /llvm/lib/Transforms/Vectorize/VecUtils.h
parentc3c28f8599f56c91974000f8044bf392beb753e5 (diff)
downloadbcm5719-llvm-54b413d157cb22ce949db12c3cdcfe997355f3d5.tar.gz
bcm5719-llvm-54b413d157cb22ce949db12c3cdcfe997355f3d5.zip
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
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VecUtils.h')
-rw-r--r--llvm/lib/Transforms/Vectorize/VecUtils.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VecUtils.h b/llvm/lib/Transforms/Vectorize/VecUtils.h
index f865236ff88..edebcb3e275 100644
--- a/llvm/lib/Transforms/Vectorize/VecUtils.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud