diff options
Diffstat (limited to 'llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h')
-rw-r--r-- | llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h b/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h index 237781dfe22e3..77236dec75dc2 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h +++ b/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h @@ -24,7 +24,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/IR/PassManager.h" -#include "llvm/Support/CommandLine.h" namespace llvm { @@ -55,8 +54,6 @@ class BoUpSLP; } // end namespace slpvectorizer -extern cl::opt<bool> RunSLPVectorization; - struct SLPVectorizerPass : public PassInfoMixin<SLPVectorizerPass> { using StoreList = SmallVector<StoreInst *, 8>; using StoreListMap = MapVector<Value *, StoreList>; @@ -96,11 +93,15 @@ private: bool tryToVectorizePair(Value *A, Value *B, slpvectorizer::BoUpSLP &R); /// Try to vectorize a list of operands. - /// \param UserCost Cost of the user operations of \p VL if they may affect - /// the cost of the vectorization. + /// When \p InsertUses is provided and its entries are non-zero + /// then users of \p VL are known to be InsertElement instructions + /// each associated with same VL entry index. Their cost is then + /// used to adjust cost of the vectorization assuming instcombine pass + /// then optimizes ExtractElement-InsertElement sequence. /// \returns true if a value was vectorized. bool tryToVectorizeList(ArrayRef<Value *> VL, slpvectorizer::BoUpSLP &R, - int UserCost = 0, bool AllowReorder = false); + bool AllowReorder = false, + ArrayRef<Value *> InsertUses = None); /// Try to vectorize a chain that may start at the operands of \p I. bool tryToVectorize(Instruction *I, slpvectorizer::BoUpSLP &R); |