diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -792,8 +792,7 @@ /// we won't know until all lvalue-to-rvalue and discarded value conversions /// have been applied to all subexpressions of the enclosing full expression. /// This is cleared at the end of each full expression. - using MaybeODRUseExprSet = llvm::SetVector, - llvm::SmallPtrSet>; + using MaybeODRUseExprSet = llvm::SmallSetVector; MaybeODRUseExprSet MaybeODRUseExprs; std::unique_ptr CachedFunctionScope; diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -8024,8 +8024,7 @@ /// enumeration types. class BuiltinCandidateTypeSet { /// TypeSet - A set of types. - typedef llvm::SetVector, - llvm::SmallPtrSet> TypeSet; + typedef llvm::SmallSetVector TypeSet; /// PointerTypes - The set of pointer types that will be used in the /// built-in candidates. diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -1729,9 +1729,7 @@ namespace { // Use SetVector since the diagnostic cares about the ordering of the Decl's. - using DeclSetVector = - llvm::SetVector, - llvm::SmallPtrSet>; + using DeclSetVector = llvm::SmallSetVector; // This visitor will traverse a conditional statement and store all // the evaluated decls into a vector. Simple is set to true if none diff --git a/llvm/include/llvm/ADT/GenericCycleInfo.h b/llvm/include/llvm/ADT/GenericCycleInfo.h --- a/llvm/include/llvm/ADT/GenericCycleInfo.h +++ b/llvm/include/llvm/ADT/GenericCycleInfo.h @@ -28,10 +28,10 @@ #ifndef LLVM_ADT_GENERICCYCLEINFO_H #define LLVM_ADT_GENERICCYCLEINFO_H +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/GenericSSAContext.h" #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -64,7 +64,7 @@ /// Basic blocks that are contained in the cycle, including entry blocks, /// and including blocks that are part of a child cycle. using BlockSetVectorT = SetVector, - SmallPtrSet>; + DenseSet, 8>; BlockSetVectorT Blocks; /// Depth of the cycle in the tree. The root "cycle" is at depth 0. diff --git a/llvm/include/llvm/CodeGen/LiveRangeEdit.h b/llvm/include/llvm/CodeGen/LiveRangeEdit.h --- a/llvm/include/llvm/CodeGen/LiveRangeEdit.h +++ b/llvm/include/llvm/CodeGen/LiveRangeEdit.h @@ -97,8 +97,7 @@ /// a load, eliminate the register by folding the def into the use. bool foldAsLoad(LiveInterval *LI, SmallVectorImpl &Dead); - using ToShrinkSet = SetVector, - SmallPtrSet>; + using ToShrinkSet = SmallSetVector; /// Helper for eliminateDeadDefs. void eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink); diff --git a/llvm/include/llvm/Transforms/Scalar/SROA.h b/llvm/include/llvm/Transforms/Scalar/SROA.h --- a/llvm/include/llvm/Transforms/Scalar/SROA.h +++ b/llvm/include/llvm/Transforms/Scalar/SROA.h @@ -105,7 +105,7 @@ /// directly promoted. Finally, each time we rewrite a use of an alloca other /// the one being actively rewritten, we add it back onto the list if not /// already present to ensure it is re-visited. - SetVector> Worklist; + SmallSetVector Worklist; /// A collection of instructions to delete. /// We try to batch deletions to simplify code and make things a bit more @@ -120,7 +120,7 @@ /// /// Note that we have to be very careful to clear allocas out of this list in /// the event they are deleted. - SetVector> PostPromotionWorklist; + SmallSetVector PostPromotionWorklist; /// A collection of alloca instructions we can directly promote. std::vector PromotableAllocas; @@ -130,7 +130,7 @@ /// All of these PHIs have been checked for the safety of speculation and by /// being speculated will allow promoting allocas currently in the promotable /// queue. - SetVector> SpeculatablePHIs; + SmallSetVector SpeculatablePHIs; /// A worklist of select instructions to rewrite prior to promoting /// allocas. diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -2680,9 +2680,7 @@ // basic blocks in a breadth-first order as we insert live successors. To // accomplish this, prioritizing for small iterations because we exit after // crossing our threshold, we use a small-size optimized SetVector. - typedef SetVector, - SmallPtrSet> - BBSetVector; + typedef SmallSetVector BBSetVector; BBSetVector BBWorklist; BBWorklist.insert(&F.getEntryBlock()); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -318,9 +318,7 @@ /// This is a collection of subprogram MDNodes that are processed to /// create DIEs. - SetVector, - SmallPtrSet> - ProcessedSPNodes; + SmallSetVector ProcessedSPNodes; /// If nonnull, stores the current machine function we're processing. const MachineFunction *CurFn = nullptr;