Index: include/llvm/ADT/SmallSet.h =================================================================== --- include/llvm/ADT/SmallSet.h +++ include/llvm/ADT/SmallSet.h @@ -15,26 +15,26 @@ #define LLVM_ADT_SMALLSET_H #include "llvm/ADT/None.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" -#include namespace llvm { -/// SmallSet - This maintains a set of unique values, optimizing for the case -/// when the set is small (less than N). In this case, the set can be -/// maintained with no mallocs. If the set gets large, we expand to using an -/// std::set to maintain reasonable lookup times. +/// This maintains a set of unique values, optimizing for the case when the set +/// is small (less than N). In this case, the set can be maintained with no +/// mallocs. If the set gets large, we expand to using another implementation +/// to maintain reasonable lookup times. /// /// Note that this set does not provide a way to iterate over members in the /// set. -template > +template > class SmallSet { /// Use a SmallVector to hold the elements here (even though it will never /// reach its 'large' stage) to avoid calling the default ctors of elements /// we will never use. SmallVector Vector; - std::set Set; + BigSet Set; typedef typename SmallVector::const_iterator VIterator; typedef typename SmallVector::iterator mutable_iterator; Index: lib/Analysis/AliasAnalysisEvaluator.cpp =================================================================== --- lib/Analysis/AliasAnalysisEvaluator.cpp +++ lib/Analysis/AliasAnalysisEvaluator.cpp @@ -31,6 +31,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" +#include using namespace llvm; static cl::opt PrintAll("print-all-alias-modref-info", cl::ReallyHidden); @@ -145,7 +146,7 @@ AliasAnalysis &AA = getAnalysis().getAAResults(); SetVector Pointers; - SetVector CallSites; + SetVector, std::set> CallSites; SetVector Loads; SetVector Stores; Index: lib/CodeGen/AggressiveAntiDepBreaker.h =================================================================== --- lib/CodeGen/AggressiveAntiDepBreaker.h +++ lib/CodeGen/AggressiveAntiDepBreaker.h @@ -28,6 +28,7 @@ #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetSubtargetInfo.h" #include +#include namespace llvm { class RegisterClassInfo; Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp =================================================================== --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -51,6 +51,7 @@ #include #include #include +#include using namespace llvm; Index: lib/ExecutionEngine/Orc/OrcMCJITReplacement.h =================================================================== --- lib/ExecutionEngine/Orc/OrcMCJITReplacement.h +++ lib/ExecutionEngine/Orc/OrcMCJITReplacement.h @@ -20,6 +20,7 @@ #include "llvm/ExecutionEngine/Orc/LazyEmittingLayer.h" #include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h" #include "llvm/Object/Archive.h" +#include namespace llvm { namespace orc { Index: lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp =================================================================== --- lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp +++ lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp @@ -23,6 +23,7 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/Support/raw_ostream.h" +#include using namespace llvm; Index: lib/Target/X86/X86FrameLowering.cpp =================================================================== --- lib/Target/X86/X86FrameLowering.cpp +++ lib/Target/X86/X86FrameLowering.cpp @@ -32,6 +32,7 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Support/Debug.h" #include +#include using namespace llvm; @@ -177,7 +178,7 @@ case X86::TCRETURNmi64: case X86::EH_RETURN: case X86::EH_RETURN64: { - SmallSet Uses; + SmallSet> Uses; for (unsigned i = 0, e = MBBI->getNumOperands(); i != e; ++i) { MachineOperand &MO = MBBI->getOperand(i); if (!MO.isReg() || MO.isDef()) Index: lib/Transforms/IPO/MergeFunctions.cpp =================================================================== --- lib/Transforms/IPO/MergeFunctions.cpp +++ lib/Transforms/IPO/MergeFunctions.cpp @@ -113,6 +113,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include +#include using namespace llvm; Index: utils/TableGen/AsmMatcherEmitter.cpp =================================================================== --- utils/TableGen/AsmMatcherEmitter.cpp +++ utils/TableGen/AsmMatcherEmitter.cpp @@ -1721,8 +1721,10 @@ } } -static unsigned getConverterOperandID(const std::string &Name, - SetVector &Table, +typedef SetVector, std::set> + StringSet; + +static unsigned getConverterOperandID(const std::string &Name, StringSet &Table, bool &IsNew) { IsNew = Table.insert(Name); @@ -1738,8 +1740,8 @@ static void emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName, std::vector> &Infos, raw_ostream &OS) { - SetVector OperandConversionKinds; - SetVector InstructionConversionKinds; + StringSet OperandConversionKinds; + StringSet InstructionConversionKinds; std::vector > ConversionTable; size_t MaxRowLength = 2; // minimum is custom converter plus terminator. Index: utils/TableGen/FixedLenDecoderEmitter.cpp =================================================================== --- utils/TableGen/FixedLenDecoderEmitter.cpp +++ utils/TableGen/FixedLenDecoderEmitter.cpp @@ -65,8 +65,12 @@ typedef uint32_t DecoderFixup; typedef std::vector FixupList; typedef std::vector FixupScopeList; -typedef SetVector PredicateSet; -typedef SetVector DecoderSet; + +typedef SetVector, std::set> + StringSet; + +typedef StringSet PredicateSet; +typedef StringSet DecoderSet; struct DecoderTableInfo { DecoderTable Table; FixupScopeList FixupStack;