[llvm] r274960 - [PM] Fix a think-o. mv {Scalar, Vectorize}/SLPVectorize.h
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 20:11:29 PDT 2016
Author: silvas
Date: Fri Jul 8 22:11:29 2016
New Revision: 274960
URL: http://llvm.org/viewvc/llvm-project?rev=274960&view=rev
Log:
[PM] Fix a think-o. mv {Scalar,Vectorize}/SLPVectorize.h
Added:
llvm/trunk/include/llvm/Transforms/Vectorize/
llvm/trunk/include/llvm/Transforms/Vectorize/SLPVectorizer.h
- copied, changed from r274959, llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h
Removed:
llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h
Modified:
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed: llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h?rev=274959&view=auto
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h (removed)
@@ -1,113 +0,0 @@
-//===---- SLPVectorizer.h ---------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// This pass implements the Bottom Up SLP vectorizer. It detects consecutive
-// stores that can be put together into vector-stores. Next, it attempts to
-// construct vectorizable tree using the use-def chains. If a profitable tree
-// was found, the SLP vectorizer performs vectorization on the tree.
-//
-// The pass is inspired by the work described in the paper:
-// "Loop-Aware SLP in GCC" by Ira Rosen, Dorit Nuzman, Ayal Zaks.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TRANSFORMS_SCALAR_SLPVECTORIZER_H
-#define LLVM_TRANSFORMS_SCALAR_SLPVECTORIZER_H
-
-#include "llvm/ADT/MapVector.h"
-#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Analysis/AssumptionCache.h"
-#include "llvm/Analysis/DemandedBits.h"
-#include "llvm/Analysis/LoopInfo.h"
-#include "llvm/Analysis/ScalarEvolution.h"
-#include "llvm/Analysis/TargetTransformInfo.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/PassManager.h"
-
-namespace llvm {
-
-/// A private "module" namespace for types and utilities used by this pass.
-/// These are implementation details and should not be used by clients.
-namespace slpvectorizer {
-class BoUpSLP;
-}
-
-struct SLPVectorizerPass : public PassInfoMixin<SLPVectorizerPass> {
- typedef SmallVector<StoreInst *, 8> StoreList;
- typedef MapVector<Value *, StoreList> StoreListMap;
- typedef SmallVector<WeakVH, 8> WeakVHList;
- typedef MapVector<Value *, WeakVHList> WeakVHListMap;
-
- ScalarEvolution *SE = nullptr;
- TargetTransformInfo *TTI = nullptr;
- TargetLibraryInfo *TLI = nullptr;
- AliasAnalysis *AA = nullptr;
- LoopInfo *LI = nullptr;
- DominatorTree *DT = nullptr;
- AssumptionCache *AC = nullptr;
- DemandedBits *DB = nullptr;
- const DataLayout *DL = nullptr;
-
-public:
- PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
-
- // Glue for old PM.
- bool runImpl(Function &F, ScalarEvolution *SE_, TargetTransformInfo *TTI_,
- TargetLibraryInfo *TLI_, AliasAnalysis *AA_, LoopInfo *LI_,
- DominatorTree *DT_, AssumptionCache *AC_, DemandedBits *DB_);
-
-private:
- /// \brief Collect store and getelementptr instructions and organize them
- /// according to the underlying object of their pointer operands. We sort the
- /// instructions by their underlying objects to reduce the cost of
- /// consecutive access queries.
- ///
- /// TODO: We can further reduce this cost if we flush the chain creation
- /// every time we run into a memory barrier.
- void collectSeedInstructions(BasicBlock *BB);
-
- /// \brief Try to vectorize a chain that starts at two arithmetic instrs.
- bool tryToVectorizePair(Value *A, Value *B, slpvectorizer::BoUpSLP &R);
-
- /// \brief Try to vectorize a list of operands.
- /// \@param BuildVector A list of users to ignore for the purpose of
- /// scheduling and that don't need extracting.
- /// \returns true if a value was vectorized.
- bool tryToVectorizeList(ArrayRef<Value *> VL, slpvectorizer::BoUpSLP &R,
- ArrayRef<Value *> BuildVector = None,
- bool allowReorder = false);
-
- /// \brief Try to vectorize a chain that may start at the operands of \V;
- bool tryToVectorize(BinaryOperator *V, slpvectorizer::BoUpSLP &R);
-
- /// \brief Vectorize the store instructions collected in Stores.
- bool vectorizeStoreChains(slpvectorizer::BoUpSLP &R);
-
- /// \brief Vectorize the index computations of the getelementptr instructions
- /// collected in GEPs.
- bool vectorizeGEPIndices(BasicBlock *BB, slpvectorizer::BoUpSLP &R);
-
- /// \brief Scan the basic block and look for patterns that are likely to start
- /// a vectorization chain.
- bool vectorizeChainsInBlock(BasicBlock *BB, slpvectorizer::BoUpSLP &R);
-
- bool vectorizeStoreChain(ArrayRef<Value *> Chain, int CostThreshold,
- slpvectorizer::BoUpSLP &R, unsigned VecRegSize);
-
- bool vectorizeStores(ArrayRef<StoreInst *> Stores, int costThreshold,
- slpvectorizer::BoUpSLP &R);
-
- /// The store instructions in a basic block organized by base pointer.
- StoreListMap Stores;
-
- /// The getelementptr instructions in a basic block organized by base pointer.
- WeakVHListMap GEPs;
-};
-}
-
-#endif // LLVM_TRANSFORMS_SCALAR_SLPVECTORIZER_H
Copied: llvm/trunk/include/llvm/Transforms/Vectorize/SLPVectorizer.h (from r274959, llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Vectorize/SLPVectorizer.h?p2=llvm/trunk/include/llvm/Transforms/Vectorize/SLPVectorizer.h&p1=llvm/trunk/include/llvm/Transforms/Scalar/SLPVectorizer.h&r1=274959&r2=274960&rev=274960&view=diff
==============================================================================
(empty)
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=274960&r1=274959&r2=274960&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Fri Jul 8 22:11:29 2016
@@ -95,7 +95,6 @@
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
#include "llvm/Transforms/Scalar/Reassociate.h"
#include "llvm/Transforms/Scalar/SCCP.h"
-#include "llvm/Transforms/Scalar/SLPVectorizer.h"
#include "llvm/Transforms/Scalar/SROA.h"
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
#include "llvm/Transforms/Scalar/Sink.h"
@@ -106,6 +105,7 @@
#include "llvm/Transforms/Utils/Mem2Reg.h"
#include "llvm/Transforms/Utils/MemorySSA.h"
#include "llvm/Transforms/Utils/SimplifyInstructions.h"
+#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
#include <type_traits>
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=274960&r1=274959&r2=274960&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Jul 8 22:11:29 2016
@@ -15,7 +15,7 @@
// "Loop-Aware SLP in GCC" by Ira Rosen, Dorit Nuzman, Ayal Zaks.
//
//===----------------------------------------------------------------------===//
-#include "llvm/Transforms/Scalar/SLPVectorizer.h"
+#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SetVector.h"
More information about the llvm-commits
mailing list