[llvm] 369c0eb - [SLP][NFC]Use SmallVector instead of std::vector and remove unused

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 08:44:55 PST 2023


Author: Alexey Bataev
Date: 2023-11-22T08:11:27-08:00
New Revision: 369c0eb55be9d07557afd1a82df4c1635c546b4c

URL: https://github.com/llvm/llvm-project/commit/369c0eb55be9d07557afd1a82df4c1635c546b4c
DIFF: https://github.com/llvm/llvm-project/commit/369c0eb55be9d07557afd1a82df4c1635c546b4c.diff

LOG: [SLP][NFC]Use SmallVector instead of std::vector and remove unused
includes, NFC.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 94408eefdf499da..1f85ab62c99ce4e 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -19,7 +19,6 @@
 #include "llvm/Transforms/Vectorize/SLPVectorizer.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/PriorityQueue.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SetOperations.h"
@@ -98,7 +97,6 @@
 #include <string>
 #include <tuple>
 #include <utility>
-#include <vector>
 
 using namespace llvm;
 using namespace llvm::PatternMatch;
@@ -3486,7 +3484,7 @@ class BoUpSLP {
     BasicBlock *BB;
 
     /// Simple memory allocation for ScheduleData.
-    std::vector<std::unique_ptr<ScheduleData[]>> ScheduleDataChunks;
+    SmallVector<std::unique_ptr<ScheduleData[]>> ScheduleDataChunks;
 
     /// The size of a ScheduleData array in ScheduleDataChunks.
     int ChunkSize;
@@ -11614,7 +11612,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
                           VecCallCosts.first <= VecCallCosts.second;
 
       Value *ScalarArg = nullptr;
-      std::vector<Value *> OpVecs;
+      SmallVector<Value *> OpVecs;
       SmallVector<Type *, 2> TysForDecl;
       // Add return type if intrinsic is overloaded on it.
       if (isVectorIntrinsicWithOverloadTypeAtArg(IID, -1))


        


More information about the llvm-commits mailing list