[llvm] r222334 - Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>

David Blaikie dblaikie at gmail.com
Wed Nov 19 15:17:15 PST 2014


On Wed, Nov 19, 2014 at 3:15 PM, Michael Ilseman <milseman at apple.com> wrote:

> Ah, I see it now. Clang’s external set is a CFGBlockSet, whose API was not
> updated in r222334 (its insert method returns a bool). That is why Clang
> currently builds correctly.
>

Ah, cunning.


> If you don’t feel like taking it on, I can change CFGBlockSet, the
> template specialization for externally managed sets, and add a unit test
> guaranteeing, at minimum, compilation. I can get on it later in the week if
> you don’t already.
>

Sure, sounds good to me.


>
>
> On Nov 19, 2014, at 2:53 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
>
> On Wed, Nov 19, 2014 at 1:19 PM, Michael Ilseman <milseman at apple.com>
> wrote:
>
>>
>> > On Nov 18, 2014, at 11:49 PM, David Blaikie <dblaikie at gmail.com> wrote:
>> >
>> > Author: dblaikie
>> > Date: Wed Nov 19 01:49:26 2014
>> > New Revision: 222334
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=222334&view=rev
>> > Log:
>> > Update SetVector to rely on the underlying set's insert to return a
>> pair<iterator, bool>
>> >
>> > This is to be consistent with StringSet and ultimately with the standard
>> > library's associative container insert function.
>> >
>> > This lead to updating SmallSet::insert to return pair<iterator, bool>,
>> > and then to update SmallPtrSet::insert to return pair<iterator, bool>,
>> > and then to update all the existing users of those functions...
>> >
>> > Modified:
>> >    llvm/trunk/include/llvm/ADT/PostOrderIterator.h
>> >    llvm/trunk/include/llvm/ADT/SetVector.h
>> >    llvm/trunk/include/llvm/ADT/SmallPtrSet.h
>> >    llvm/trunk/include/llvm/ADT/SmallSet.h
>> >    llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h
>> >    llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
>> >    llvm/trunk/include/llvm/CodeGen/MachineDominators.h
>> >    llvm/trunk/include/llvm/Support/GenericDomTreeConstruction.h
>> >    llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
>> >    llvm/trunk/lib/Analysis/CFG.cpp
>> >    llvm/trunk/lib/Analysis/CaptureTracking.cpp
>> >    llvm/trunk/lib/Analysis/CodeMetrics.cpp
>> >    llvm/trunk/lib/Analysis/ConstantFolding.cpp
>> >    llvm/trunk/lib/Analysis/IPA/InlineCost.cpp
>> >    llvm/trunk/lib/Analysis/IVUsers.cpp
>> >    llvm/trunk/lib/Analysis/InstructionSimplify.cpp
>> >    llvm/trunk/lib/Analysis/LazyCallGraph.cpp
>> >    llvm/trunk/lib/Analysis/Lint.cpp
>> >    llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
>> >    llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
>> >    llvm/trunk/lib/Analysis/PtrUseVisitor.cpp
>> >    llvm/trunk/lib/Analysis/ScalarEvolution.cpp
>> >    llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
>> >    llvm/trunk/lib/Analysis/StratifiedSets.h
>> >    llvm/trunk/lib/Analysis/ValueTracking.cpp
>> >    llvm/trunk/lib/AsmParser/LLParser.cpp
>> >    llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp
>> >    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
>> >    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> >    llvm/trunk/lib/CodeGen/BranchFolding.cpp
>> >    llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
>> >    llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
>> >    llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
>> >    llvm/trunk/lib/CodeGen/InlineSpiller.cpp
>> >    llvm/trunk/lib/CodeGen/LiveInterval.cpp
>> >    llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
>> >    llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
>> >    llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
>> >    llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp
>> >    llvm/trunk/lib/CodeGen/MachineLICM.cpp
>> >    llvm/trunk/lib/CodeGen/MachineSink.cpp
>> >    llvm/trunk/lib/CodeGen/MachineTraceMetrics.cpp
>> >    llvm/trunk/lib/CodeGen/OptimizePHIs.cpp
>> >    llvm/trunk/lib/CodeGen/PHIElimination.cpp
>> >    llvm/trunk/lib/CodeGen/RegAllocFast.cpp
>> >    llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
>> >    llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
>> >    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>> >    llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
>> >    llvm/trunk/lib/CodeGen/StackProtector.cpp
>> >    llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
>> >    llvm/trunk/lib/IR/Constants.cpp
>> >    llvm/trunk/lib/IR/DIBuilder.cpp
>> >    llvm/trunk/lib/IR/DebugInfo.cpp
>> >    llvm/trunk/lib/IR/Type.cpp
>> >    llvm/trunk/lib/IR/Value.cpp
>> >    llvm/trunk/lib/IR/Verifier.cpp
>> >    llvm/trunk/lib/Linker/LinkModules.cpp
>> >    llvm/trunk/lib/Support/CommandLine.cpp
>> >    llvm/trunk/lib/Support/SmallPtrSet.cpp
>> >    llvm/trunk/lib/Target/AArch64/AArch64PromoteConstant.cpp
>> >    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>> >    llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
>> >    llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
>> >    llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
>> >    llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
>> >    llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
>> >    llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
>> >    llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
>> >    llvm/trunk/lib/Transforms/IPO/Inliner.cpp
>> >    llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
>> >    llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp
>> >    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>> >    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
>> >    llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp
>> >    llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
>> >    llvm/trunk/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/ADCE.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/SROA.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
>> >    llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp
>> >    llvm/trunk/lib/Transforms/Utils/GlobalStatus.cpp
>> >    llvm/trunk/lib/Transforms/Utils/Local.cpp
>> >    llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
>> >    llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
>> >    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>> >    llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp
>> >    llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
>> >    llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>> >    llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
>> >    llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
>> >
>> > Modified: llvm/trunk/include/llvm/ADT/PostOrderIterator.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PostOrderIterator.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/ADT/PostOrderIterator.h (original)
>> > +++ llvm/trunk/include/llvm/ADT/PostOrderIterator.h Wed Nov 19 01:49:26
>> 2014
>> > @@ -57,7 +57,7 @@ public:
>> >   // Return true if edge destination should be visited.
>> >   template<typename NodeType>
>> >   bool insertEdge(NodeType *From, NodeType *To) {
>> > -    return Visited.insert(To);
>> > +    return Visited.insert(To).second;
>> >   }
>> >
>> >   // Called after all children of BB have been visited.
>> >
>>
>> There is another insertEdge() definition in the template specialization
>> right below that struct (for External ownership). Apparently Clang/LLVM
>> builds fine with the bug. If we don’t have any uses of that specialization,
>> should “External" be removed, or do we want to just update it without a
>> test/user?
>
>
> Looks like it's used in Clang's static analysis code (by commenting out
> the problematic specialization and making it a declaration, you can see
> that Clang's libAnalysis fails to compile) so removal probably isn't the
> answer.
>
>
>> Maybe a unit test can reference the specialization?
>>
>
> Looks like Clang's use happens not to use the insertEdge feature, but
> yeah, it doesn't seem reasonable to leave it broken like that - unit
> testing in LLVM would be quite appropriate (it's also helpful to ensure
> that the class is tested in LLVM so that LLVM developers who aren't working
> on Clang don't accidentally break Clang's existing uses).
>
> Were you volunteering to add such testing?
>
>
>> I’m asking because I don’t know the community’s preference, but if
>> someone were to have a po_iterator with external storage, then this will
>> not compile.
>>
>
> Yep, here's one of a few error messages from building Clang without the
> external storage support:
>
> In file included from
> /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/lib/Analysis/PostOrderCFGView.cpp:14:
> In file included from
> /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h:20:
> /usr/local/google/home/blaikie/dev/llvm/src/include/llvm/ADT/PostOrderIterator.h:93:28:
> error: implicit instantiation of undefined template
> 'llvm::po_iterator_storage<clang::PostOrderCFGView::CFGBlockSet, true>'
>                     public po_iterator_storage<SetType, ExtStorage> {
>                            ^
> /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/lib/Analysis/PostOrderCFGView.cpp:24:24:
> note: in instantiation of template class 'llvm::po_iterator<const
> clang::CFG *, clang::PostOrderCFGView::CFGBlockSet, true,
> llvm::GraphTraits<const ::clang::CFG *> >' requested here
>   for (po_iterator I = po_iterator::begin(cfg, BSet),
>                        ^
> /usr/local/google/home/blaikie/dev/llvm/src/include/llvm/ADT/PostOrderIterator.h:70:7:
> note: template is declared here
> class po_iterator_storage<SetType, true>; /* {
>       ^
>
>
>>
>>
>> > Modified: llvm/trunk/include/llvm/ADT/SetVector.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SetVector.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/ADT/SetVector.h (original)
>> > +++ llvm/trunk/include/llvm/ADT/SetVector.h Wed Nov 19 01:49:26 2014
>> > @@ -100,7 +100,7 @@ public:
>> >   /// \brief Insert a new element into the SetVector.
>> >   /// \returns true iff the element was inserted into the SetVector.
>> >   bool insert(const value_type &X) {
>> > -    bool result = set_.insert(X);
>> > +    bool result = set_.insert(X).second;
>> >     if (result)
>> >       vector_.push_back(X);
>> >     return result;
>> > @@ -110,7 +110,7 @@ public:
>> >   template<typename It>
>> >   void insert(It Start, It End) {
>> >     for (; Start != End; ++Start)
>> > -      if (set_.insert(*Start))
>> > +      if (set_.insert(*Start).second)
>> >         vector_.push_back(*Start);
>> >   }
>> >
>> >
>> > Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)
>> > +++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Wed Nov 19 01:49:26 2014
>> > @@ -100,7 +100,7 @@ protected:
>> >   /// insert_imp - This returns true if the pointer was new to the set,
>> false if
>> >   /// it was already in the set.  This is hidden from the client so
>> that the
>> >   /// derived class can check that the right type of pointer is passed
>> in.
>> > -  bool insert_imp(const void * Ptr);
>> > +  std::pair<const void *const *, bool> insert_imp(const void *Ptr);
>> >
>> >   /// erase_imp - If the set contains the specified pointer, remove it
>> and
>> >   /// return true, otherwise return false.  This is hidden from the
>> client so
>> > @@ -253,10 +253,14 @@ protected:
>> >       : SmallPtrSetImplBase(SmallStorage, SmallSize) {}
>> >
>> > public:
>> > +  typedef SmallPtrSetIterator<PtrType> iterator;
>> > +  typedef SmallPtrSetIterator<PtrType> const_iterator;
>> > +
>> >   /// insert - This returns true if the pointer was new to the set,
>> false if it
>> >   /// was already in the set.
>> > -  bool insert(PtrType Ptr) {
>> > -    return insert_imp(PtrTraits::getAsVoidPointer(Ptr));
>> > +  std::pair<iterator, bool> insert(PtrType Ptr) {
>> > +    auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr));
>> > +    return std::make_pair(iterator(p.first, CurArray + CurArraySize),
>> p.second);
>> >   }
>> >
>> >   /// erase - If the set contains the specified pointer, remove it and
>> return
>> > @@ -276,8 +280,6 @@ public:
>> >       insert(*I);
>> >   }
>> >
>> > -  typedef SmallPtrSetIterator<PtrType> iterator;
>> > -  typedef SmallPtrSetIterator<PtrType> const_iterator;
>> >   inline iterator begin() const {
>> >     return iterator(CurArray, CurArray+CurArraySize);
>> >   }
>> >
>> > Modified: llvm/trunk/include/llvm/ADT/SmallSet.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallSet.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/ADT/SmallSet.h (original)
>> > +++ llvm/trunk/include/llvm/ADT/SmallSet.h Wed Nov 19 01:49:26 2014
>> > @@ -14,6 +14,7 @@
>> > #ifndef LLVM_ADT_SMALLSET_H
>> > #define LLVM_ADT_SMALLSET_H
>> >
>> > +#include "llvm/ADT/None.h"
>> > #include "llvm/ADT/SmallPtrSet.h"
>> > #include "llvm/ADT/SmallVector.h"
>> > #include <set>
>> > @@ -60,16 +61,21 @@ public:
>> >
>> >   /// insert - Insert an element into the set if it isn't already there.
>> >   /// Returns true if the element is inserted (it was not in the set
>> before).
>> > -  bool insert(const T &V) {
>> > +  /// The first value of the returned pair is unused and provided for
>> > +  /// partial compatibility with the standard library self-associative
>> container
>> > +  /// concept.
>> > +  // FIXME: Add iterators that abstract over the small and large form,
>> and then
>> > +  // return those here.
>> > +  std::pair<NoneType, bool> insert(const T &V) {
>> >     if (!isSmall())
>> > -      return Set.insert(V).second;
>> > +      return std::make_pair(None, Set.insert(V).second);
>> >
>> >     VIterator I = vfind(V);
>> >     if (I != Vector.end())    // Don't reinsert if it already exists.
>> > -      return false;
>> > +      return std::make_pair(None, false);
>> >     if (Vector.size() < N) {
>> >       Vector.push_back(V);
>> > -      return true;
>> > +      return std::make_pair(None, true);
>> >     }
>> >
>> >     // Otherwise, grow from vector to set.
>> > @@ -78,7 +84,7 @@ public:
>> >       Vector.pop_back();
>> >     }
>> >     Set.insert(V);
>> > -    return true;
>> > +    return std::make_pair(None, true);
>> >   }
>> >
>> >   template <typename IterT>
>> >
>> > Modified: llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h (original)
>> > +++ llvm/trunk/include/llvm/Analysis/DominanceFrontierImpl.h Wed Nov 19
>> 01:49:26 2014
>> > @@ -172,7 +172,7 @@ ForwardDominanceFrontierBase<BlockT>::ca
>> >     DomSetType &S = this->Frontiers[currentBB];
>> >
>> >     // Visit each block only once.
>> > -    if (visited.insert(currentBB)) {
>> > +    if (visited.insert(currentBB).second) {
>> >       // Loop over CFG successors to calculate DFlocal[currentNode]
>> >       for (auto SI = BlockTraits::child_begin(currentBB),
>> >                 SE = BlockTraits::child_end(currentBB);
>> >
>> > Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
>> (original)
>> > +++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Wed
>> Nov 19 01:49:26 2014
>> > @@ -577,7 +577,7 @@ namespace llvm {
>> >     SmallPtrSet<const SCEV *, 8> Visited;
>> >
>> >     void push(const SCEV *S) {
>> > -      if (Visited.insert(S) && Visitor.follow(S))
>> > +      if (Visited.insert(S).second && Visitor.follow(S))
>> >         Worklist.push_back(S);
>> >     }
>> >   public:
>> >
>> > Modified: llvm/trunk/include/llvm/CodeGen/MachineDominators.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineDominators.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/CodeGen/MachineDominators.h (original)
>> > +++ llvm/trunk/include/llvm/CodeGen/MachineDominators.h Wed Nov 19
>> 01:49:26 2014
>> > @@ -303,7 +303,7 @@ public:
>> >   void recordSplitCriticalEdge(MachineBasicBlock *FromBB,
>> >                               MachineBasicBlock *ToBB,
>> >                               MachineBasicBlock *NewBB) {
>> > -    bool Inserted = NewBBs.insert(NewBB);
>> > +    bool Inserted = NewBBs.insert(NewBB).second;
>> >     (void)Inserted;
>> >     assert(Inserted &&
>> >            "A basic block inserted via edge splitting cannot appear
>> twice");
>> >
>> > Modified: llvm/trunk/include/llvm/Support/GenericDomTreeConstruction.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTreeConstruction.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/include/llvm/Support/GenericDomTreeConstruction.h
>> (original)
>> > +++ llvm/trunk/include/llvm/Support/GenericDomTreeConstruction.h Wed
>> Nov 19 01:49:26 2014
>> > @@ -125,7 +125,7 @@ Eval(DominatorTreeBase<typename GraphT::
>> >     typename GraphT::NodeType* VAncestor = DT.Vertex[VInfo.Parent];
>> >
>> >     // Process Ancestor first
>> > -    if (Visited.insert(VAncestor) && VInfo.Parent >= LastLinked) {
>> > +    if (Visited.insert(VAncestor).second && VInfo.Parent >=
>> LastLinked) {
>> >       Work.push_back(VAncestor);
>> >       continue;
>> >     }
>> >
>> > Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -614,7 +614,7 @@ BasicAliasAnalysis::pointsToConstantMemo
>> >   Worklist.push_back(Loc.Ptr);
>> >   do {
>> >     const Value *V = GetUnderlyingObject(Worklist.pop_back_val(), DL);
>> > -    if (!Visited.insert(V)) {
>> > +    if (!Visited.insert(V).second) {
>> >       Visited.clear();
>> >       return AliasAnalysis::pointsToConstantMemory(Loc, OrLocal);
>> >     }
>> > @@ -1235,7 +1235,7 @@ BasicAliasAnalysis::aliasPHI(const PHINo
>> >       // sides are PHI nodes. In which case, this is O(m x n) time
>> where 'm'
>> >       // and 'n' are the number of PHI sources.
>> >       return MayAlias;
>> > -    if (UniqueSrc.insert(PV1))
>> > +    if (UniqueSrc.insert(PV1).second)
>> >       V1Srcs.push_back(PV1);
>> >   }
>> >
>> >
>> > Modified: llvm/trunk/lib/Analysis/CFG.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFG.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/CFG.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/CFG.cpp Wed Nov 19 01:49:26 2014
>> > @@ -45,7 +45,7 @@ void llvm::FindFunctionBackedges(const F
>> >     bool FoundNew = false;
>> >     while (I != succ_end(ParentBB)) {
>> >       BB = *I++;
>> > -      if (Visited.insert(BB)) {
>> > +      if (Visited.insert(BB).second) {
>> >         FoundNew = true;
>> >         break;
>> >       }
>> > @@ -141,7 +141,7 @@ static bool isPotentiallyReachableInner(
>> >   SmallSet<const BasicBlock*, 64> Visited;
>> >   do {
>> >     BasicBlock *BB = Worklist.pop_back_val();
>> > -    if (!Visited.insert(BB))
>> > +    if (!Visited.insert(BB).second)
>> >       continue;
>> >     if (BB == StopBB)
>> >       return true;
>> >
>> > Modified: llvm/trunk/lib/Analysis/CaptureTracking.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CaptureTracking.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/CaptureTracking.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/CaptureTracking.cpp Wed Nov 19 01:49:26 2014
>> > @@ -239,7 +239,7 @@ void llvm::PointerMayBeCaptured(const Va
>> >         if (Count++ >= Threshold)
>> >           return Tracker->tooManyUses();
>> >
>> > -        if (Visited.insert(&UU))
>> > +        if (Visited.insert(&UU).second)
>> >           if (Tracker->shouldExplore(&UU))
>> >             Worklist.push_back(&UU);
>> >       }
>> >
>> > Modified: llvm/trunk/lib/Analysis/CodeMetrics.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CodeMetrics.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/CodeMetrics.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/CodeMetrics.cpp Wed Nov 19 01:49:26 2014
>> > @@ -40,7 +40,7 @@ static void completeEphemeralValues(Smal
>> >     const Value *V = WorkSet.front();
>> >     WorkSet.erase(WorkSet.begin());
>> >
>> > -    if (!Visited.insert(V))
>> > +    if (!Visited.insert(V).second)
>> >       continue;
>> >
>> >     // If all uses of this value are ephemeral, then so is this value.
>> >
>> > Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Wed Nov 19 01:49:26 2014
>> > @@ -981,7 +981,7 @@ ConstantFoldConstantExpressionImpl(const
>> >     // Recursively fold the ConstantExpr's operands. If we have already
>> folded
>> >     // a ConstantExpr, we don't have to process it again.
>> >     if (ConstantExpr *NewCE = dyn_cast<ConstantExpr>(NewC)) {
>> > -      if (FoldedOps.insert(NewCE))
>> > +      if (FoldedOps.insert(NewCE).second)
>> >         NewC = ConstantFoldConstantExpressionImpl(NewCE, TD, TLI,
>> FoldedOps);
>> >     }
>> >     Ops.push_back(NewC);
>> >
>> > Modified: llvm/trunk/lib/Analysis/IPA/InlineCost.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/InlineCost.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/IPA/InlineCost.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/IPA/InlineCost.cpp Wed Nov 19 01:49:26 2014
>> > @@ -977,7 +977,7 @@ ConstantInt *CallAnalyzer::stripAndCompu
>> >       break;
>> >     }
>> >     assert(V->getType()->isPointerTy() && "Unexpected operand type!");
>> > -  } while (Visited.insert(V));
>> > +  } while (Visited.insert(V).second);
>> >
>> >   Type *IntPtrTy = DL->getIntPtrType(V->getContext());
>> >   return cast<ConstantInt>(ConstantInt::get(IntPtrTy, Offset));
>> >
>> > Modified: llvm/trunk/lib/Analysis/IVUsers.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/IVUsers.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/IVUsers.cpp Wed Nov 19 01:49:26 2014
>> > @@ -115,7 +115,7 @@ bool IVUsers::AddUsersImpl(Instruction *
>> >                            SmallPtrSetImpl<Loop*> &SimpleLoopNests) {
>> >   // Add this IV user to the Processed set before returning false to
>> ensure that
>> >   // all IV users are members of the set. See
>> IVUsers::isIVUserOrOperand.
>> > -  if (!Processed.insert(I))
>> > +  if (!Processed.insert(I).second)
>> >     return true;    // Instruction already handled.
>> >
>> >   if (!SE->isSCEVable(I->getType()))
>> > @@ -145,7 +145,7 @@ bool IVUsers::AddUsersImpl(Instruction *
>> >   SmallPtrSet<Instruction *, 4> UniqueUsers;
>> >   for (Use &U : I->uses()) {
>> >     Instruction *User = cast<Instruction>(U.getUser());
>> > -    if (!UniqueUsers.insert(User))
>> > +    if (!UniqueUsers.insert(User).second)
>> >       continue;
>> >
>> >     // Do not infinitely recurse on PHI nodes.
>> >
>> > Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -631,7 +631,7 @@ static Constant *stripAndComputeConstant
>> >     }
>> >     assert(V->getType()->getScalarType()->isPointerTy() &&
>> >            "Unexpected operand type!");
>> > -  } while (Visited.insert(V));
>> > +  } while (Visited.insert(V).second);
>> >
>> >   Constant *OffsetIntPtr = ConstantInt::get(IntPtrTy, Offset);
>> >   if (V->getType()->isVectorTy())
>> >
>> > Modified: llvm/trunk/lib/Analysis/LazyCallGraph.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyCallGraph.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/LazyCallGraph.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/LazyCallGraph.cpp Wed Nov 19 01:49:26 2014
>> > @@ -48,7 +48,7 @@ static void findCallees(
>> >     }
>> >
>> >     for (Value *Op : C->operand_values())
>> > -      if (Visited.insert(cast<Constant>(Op)))
>> > +      if (Visited.insert(cast<Constant>(Op)).second)
>> >         Worklist.push_back(cast<Constant>(Op));
>> >   }
>> > }
>> > @@ -66,7 +66,7 @@ LazyCallGraph::Node::Node(LazyCallGraph
>> >     for (Instruction &I : BB)
>> >       for (Value *Op : I.operand_values())
>> >         if (Constant *C = dyn_cast<Constant>(Op))
>> > -          if (Visited.insert(C))
>> > +          if (Visited.insert(C).second)
>> >             Worklist.push_back(C);
>> >
>> >   // We've collected all the constant (and thus potentially function or
>> > @@ -113,7 +113,7 @@ LazyCallGraph::LazyCallGraph(Module &M)
>> >   SmallPtrSet<Constant *, 16> Visited;
>> >   for (GlobalVariable &GV : M.globals())
>> >     if (GV.hasInitializer())
>> > -      if (Visited.insert(GV.getInitializer()))
>> > +      if (Visited.insert(GV.getInitializer()).second)
>> >         Worklist.push_back(GV.getInitializer());
>> >
>> >   DEBUG(dbgs() << "  Adding functions referenced by global initializers
>> to the "
>> > @@ -688,7 +688,7 @@ static void printNodes(raw_ostream &OS,
>> >                        SmallPtrSetImpl<LazyCallGraph::Node *> &Printed)
>> {
>> >   // Recurse depth first through the nodes.
>> >   for (LazyCallGraph::Node &ChildN : N)
>> > -    if (Printed.insert(&ChildN))
>> > +    if (Printed.insert(&ChildN).second)
>> >       printNodes(OS, ChildN, Printed);
>> >
>> >   OS << "  Call edges in function: " << N.getFunction().getName() <<
>> "\n";
>> > @@ -717,7 +717,7 @@ PreservedAnalyses LazyCallGraphPrinterPa
>> >
>> >   SmallPtrSet<LazyCallGraph::Node *, 16> Printed;
>> >   for (LazyCallGraph::Node &N : G)
>> > -    if (Printed.insert(&N))
>> > +    if (Printed.insert(&N).second)
>> >       printNodes(OS, N, Printed);
>> >
>> >   for (LazyCallGraph::SCC &SCC : G.postorder_sccs())
>> >
>> > Modified: llvm/trunk/lib/Analysis/Lint.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/Lint.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/Lint.cpp Wed Nov 19 01:49:26 2014
>> > @@ -631,7 +631,7 @@ Value *Lint::findValue(Value *V, bool Of
>> > Value *Lint::findValueImpl(Value *V, bool OffsetOk,
>> >                            SmallPtrSetImpl<Value *> &Visited) const {
>> >   // Detect self-referential values.
>> > -  if (!Visited.insert(V))
>> > +  if (!Visited.insert(V).second)
>> >     return UndefValue::get(V->getType());
>> >
>> >   // TODO: Look through sext or zext cast, when the result is known to
>> > @@ -645,7 +645,8 @@ Value *Lint::findValueImpl(Value *V, boo
>> >     BasicBlock *BB = L->getParent();
>> >     SmallPtrSet<BasicBlock *, 4> VisitedBlocks;
>> >     for (;;) {
>> > -      if (!VisitedBlocks.insert(BB)) break;
>> > +      if (!VisitedBlocks.insert(BB).second)
>> > +        break;
>> >       if (Value *U = FindAvailableLoadedValue(L->getPointerOperand(),
>> >                                               BB, BBI, 6, AA))
>> >         return findValueImpl(U, OffsetOk, Visited);
>> >
>> > Modified: llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryBuiltins.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/MemoryBuiltins.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/MemoryBuiltins.cpp Wed Nov 19 01:49:26 2014
>> > @@ -416,7 +416,7 @@ SizeOffsetType ObjectSizeOffsetVisitor::
>> >   if (Instruction *I = dyn_cast<Instruction>(V)) {
>> >     // If we have already seen this instruction, bail out. Cycles can
>> happen in
>> >     // unreachable code after constant propagation.
>> > -    if (!SeenInsts.insert(I))
>> > +    if (!SeenInsts.insert(I).second)
>> >       return unknown();
>> >
>> >     if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
>> > @@ -652,7 +652,7 @@ SizeOffsetEvalType ObjectSizeOffsetEvalu
>> >   // Record the pointers that were handled in this run, so that they
>> can be
>> >   // cleaned later if something fails. We also use this set to break
>> cycles that
>> >   // can occur in dead code.
>> > -  if (!SeenVals.insert(V)) {
>> > +  if (!SeenVals.insert(V).second) {
>> >     Result = unknown();
>> >   } else if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
>> >     Result = visitGEPOperator(*GEP);
>> >
>> > Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -776,7 +776,7 @@ MemoryDependenceAnalysis::getNonLocalCal
>> >     DirtyBlocks.pop_back();
>> >
>> >     // Already processed this block?
>> > -    if (!Visited.insert(DirtyBB))
>> > +    if (!Visited.insert(DirtyBB).second)
>> >       continue;
>> >
>> >     // Do a binary search to see if we already have an entry for this
>> block in
>> >
>> > Modified: llvm/trunk/lib/Analysis/PtrUseVisitor.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PtrUseVisitor.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/PtrUseVisitor.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/PtrUseVisitor.cpp Wed Nov 19 01:49:26 2014
>> > @@ -17,7 +17,7 @@ using namespace llvm;
>> >
>> > void detail::PtrUseVisitorBase::enqueueUsers(Instruction &I) {
>> >   for (Use &U : I.uses()) {
>> > -    if (VisitedUses.insert(&U)) {
>> > +    if (VisitedUses.insert(&U).second) {
>> >       UseToVisit NewU = {
>> >         UseToVisit::UseAndIsOffsetKnownPair(&U, IsOffsetKnown),
>> >         Offset
>> >
>> > Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Nov 19 01:49:26 2014
>> > @@ -3395,7 +3395,8 @@ ScalarEvolution::ForgetSymbolicName(Inst
>> >   Visited.insert(PN);
>> >   while (!Worklist.empty()) {
>> >     Instruction *I = Worklist.pop_back_val();
>> > -    if (!Visited.insert(I)) continue;
>> > +    if (!Visited.insert(I).second)
>> > +      continue;
>> >
>> >     ValueExprMapType::iterator It =
>> >       ValueExprMap.find_as(static_cast<Value *>(I));
>> > @@ -4593,7 +4594,8 @@ ScalarEvolution::getBackedgeTakenInfo(co
>> >     SmallPtrSet<Instruction *, 8> Visited;
>> >     while (!Worklist.empty()) {
>> >       Instruction *I = Worklist.pop_back_val();
>> > -      if (!Visited.insert(I)) continue;
>> > +      if (!Visited.insert(I).second)
>> > +        continue;
>> >
>> >       ValueExprMapType::iterator It =
>> >         ValueExprMap.find_as(static_cast<Value *>(I));
>> > @@ -4645,7 +4647,8 @@ void ScalarEvolution::forgetLoop(const L
>> >   SmallPtrSet<Instruction *, 8> Visited;
>> >   while (!Worklist.empty()) {
>> >     Instruction *I = Worklist.pop_back_val();
>> > -    if (!Visited.insert(I)) continue;
>> > +    if (!Visited.insert(I).second)
>> > +      continue;
>> >
>> >     ValueExprMapType::iterator It =
>> >       ValueExprMap.find_as(static_cast<Value *>(I));
>> > @@ -4679,7 +4682,8 @@ void ScalarEvolution::forgetValue(Value
>> >   SmallPtrSet<Instruction *, 8> Visited;
>> >   while (!Worklist.empty()) {
>> >     I = Worklist.pop_back_val();
>> > -    if (!Visited.insert(I)) continue;
>> > +    if (!Visited.insert(I).second)
>> > +      continue;
>> >
>> >     ValueExprMapType::iterator It =
>> >       ValueExprMap.find_as(static_cast<Value *>(I));
>> > @@ -7792,7 +7796,7 @@ void ScalarEvolution::SCEVCallbackVH::al
>> >     // that until everything else is done.
>> >     if (U == Old)
>> >       continue;
>> > -    if (!Visited.insert(U))
>> > +    if (!Visited.insert(U).second)
>> >       continue;
>> >     if (PHINode *PN = dyn_cast<PHINode>(U))
>> >       SE->ConstantEvolutionLoopExitValue.erase(PN);
>> >
>> > Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1443,7 +1443,7 @@ Value *SCEVExpander::visitAddRecExpr(con
>> >     Constant *One = ConstantInt::get(Ty, 1);
>> >     for (pred_iterator HPI = HPB; HPI != HPE; ++HPI) {
>> >       BasicBlock *HP = *HPI;
>> > -      if (!PredSeen.insert(HP)) {
>> > +      if (!PredSeen.insert(HP).second) {
>> >         // There must be an incoming value for each predecessor, even
>> the
>> >         // duplicates!
>> >
>>  CanonicalIV->addIncoming(CanonicalIV->getIncomingValueForBlock(HP), HP);
>> >
>> > Modified: llvm/trunk/lib/Analysis/StratifiedSets.h
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/StratifiedSets.h?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/StratifiedSets.h (original)
>> > +++ llvm/trunk/lib/Analysis/StratifiedSets.h Wed Nov 19 01:49:26 2014
>> > @@ -363,7 +363,7 @@ template <typename T> class StratifiedSe
>> >     SmallSet<StratifiedIndex, 16> Visited;
>> >     for (unsigned I = 0, E = Links.size(); I < E; ++I) {
>> >       auto CurrentIndex = getHighestParentAbove(I);
>> > -      if (!Visited.insert(CurrentIndex)) {
>> > +      if (!Visited.insert(CurrentIndex).second) {
>> >         continue;
>> >       }
>> >
>> >
>> > Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
>> > +++ llvm/trunk/lib/Analysis/ValueTracking.cpp Wed Nov 19 01:49:26 2014
>> > @@ -331,7 +331,7 @@ static bool isEphemeralValueOf(Instructi
>> >
>> >   while (!WorkSet.empty()) {
>> >     const Value *V = WorkSet.pop_back_val();
>> > -    if (!Visited.insert(V))
>> > +    if (!Visited.insert(V).second)
>> >       continue;
>> >
>> >     // If all uses of this value are ephemeral, then so is this value.
>> > @@ -2405,7 +2405,7 @@ static uint64_t GetStringLengthH(Value *
>> >   // If this is a PHI node, there are two cases: either we have already
>> seen it
>> >   // or we haven't.
>> >   if (PHINode *PN = dyn_cast<PHINode>(V)) {
>> > -    if (!PHIs.insert(PN))
>> > +    if (!PHIs.insert(PN).second)
>> >       return ~0ULL;  // already in the set.
>> >
>> >     // If it was new, see if all the input strings are the same length.
>> > @@ -2499,7 +2499,7 @@ llvm::GetUnderlyingObjects(Value *V,
>> >     Value *P = Worklist.pop_back_val();
>> >     P = GetUnderlyingObject(P, TD, MaxLookup);
>> >
>> > -    if (!Visited.insert(P))
>> > +    if (!Visited.insert(P).second)
>> >       continue;
>> >
>> >     if (SelectInst *SI = dyn_cast<SelectInst>(P)) {
>> >
>> > Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
>> > +++ llvm/trunk/lib/AsmParser/LLParser.cpp Wed Nov 19 01:49:26 2014
>> > @@ -3735,7 +3735,7 @@ bool LLParser::ParseSwitch(Instruction *
>> >         ParseTypeAndBasicBlock(DestBB, PFS))
>> >       return true;
>> >
>> > -    if (!SeenCases.insert(Constant))
>> > +    if (!SeenCases.insert(Constant).second)
>> >       return Error(CondLoc, "duplicate case value in switch");
>> >     if (!isa<ConstantInt>(Constant))
>> >       return Error(CondLoc, "case value is not a constant integer");
>> >
>> > Modified: llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -256,7 +256,7 @@ static void AntiDepEdges(const SUnit *SU
>> >   for (SUnit::const_pred_iterator P = SU->Preds.begin(), PE =
>> SU->Preds.end();
>> >        P != PE; ++P) {
>> >     if ((P->getKind() == SDep::Anti) || (P->getKind() == SDep::Output))
>> {
>> > -      if (RegSet.insert(P->getReg()))
>> > +      if (RegSet.insert(P->getReg()).second)
>> >         Edges.push_back(&*P);
>> >     }
>> >   }
>> >
>> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1167,7 +1167,8 @@ void AsmPrinter::EmitJumpTableInfo() {
>> >       const MCExpr *Base =
>> TLI->getPICJumpTableRelocBaseExpr(MF,JTI,OutContext);
>> >       for (unsigned ii = 0, ee = JTBBs.size(); ii != ee; ++ii) {
>> >         const MachineBasicBlock *MBB = JTBBs[ii];
>> > -        if (!EmittedSets.insert(MBB)) continue;
>> > +        if (!EmittedSets.insert(MBB).second)
>> > +          continue;
>> >
>> >         // .set LJTSet, LBB32-base
>> >         const MCExpr *LHS =
>> >
>> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -990,7 +990,7 @@ DwarfDebug::collectVariableInfo(DwarfCom
>> >   for (unsigned i = 0, e = Variables.getNumElements(); i != e; ++i) {
>> >     DIVariable DV(Variables.getElement(i));
>> >     assert(DV.isVariable());
>> > -    if (!Processed.insert(DV))
>> > +    if (!Processed.insert(DV).second)
>> >       continue;
>> >     if (LexicalScope *Scope =
>> LScopes.findLexicalScope(DV.getContext())) {
>> >       ensureAbstractVariableIsCreatedIfScoped(DV,
>> Scope->getScopeNode());
>> > @@ -1287,7 +1287,7 @@ void DwarfDebug::endFunction(const Machi
>> >     for (unsigned i = 0, e = Variables.getNumElements(); i != e; ++i) {
>> >       DIVariable DV(Variables.getElement(i));
>> >       assert(DV && DV.isVariable());
>> > -      if (!ProcessedVars.insert(DV))
>> > +      if (!ProcessedVars.insert(DV).second)
>> >         continue;
>> >       ensureAbstractVariableIsCreated(DV, DV.getContext());
>> >       assert(LScopes.getAbstractScopesList().size() == NumAbstractScopes
>> >
>> > Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Wed Nov 19 01:49:26 2014
>> > @@ -916,7 +916,7 @@ bool BranchFolder::TailMergeBlocks(Machi
>> >         continue;
>> >
>> >       // Visit each predecessor only once.
>> > -      if (!UniquePreds.insert(PBB))
>> > +      if (!UniquePreds.insert(PBB).second)
>> >         continue;
>> >
>> >       // Skip blocks which may jump to a landing pad. Can't tail merge
>> these.
>> >
>> > Modified: llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp Wed Nov 19 01:49:26 2014
>> > @@ -120,7 +120,7 @@ VirtRegAuxInfo::calculateSpillWeightAndH
>> >     numInstr++;
>> >     if (mi->isIdentityCopy() || mi->isImplicitDef() ||
>> mi->isDebugValue())
>> >       continue;
>> > -    if (!visited.insert(mi))
>> > +    if (!visited.insert(mi).second)
>> >       continue;
>> >
>> >     float weight = 1.0f;
>> >
>> > Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Wed Nov 19 01:49:26 2014
>> > @@ -1001,7 +1001,7 @@ bool CodeGenPrepare::DupRetToEnableTailC
>> >   } else {
>> >     SmallPtrSet<BasicBlock*, 4> VisitedBBs;
>> >     for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI !=
>> PE; ++PI) {
>> > -      if (!VisitedBBs.insert(*PI))
>> > +      if (!VisitedBBs.insert(*PI).second)
>> >         continue;
>> >
>> >       BasicBlock::InstListType &InstList = (*PI)->getInstList();
>> > @@ -2401,7 +2401,7 @@ static bool FindAllMemoryUses(Instructio
>> >                               SmallPtrSetImpl<Instruction*>
>> &ConsideredInsts,
>> >                               const TargetLowering &TLI) {
>> >   // If we already considered this instruction, we're done.
>> > -  if (!ConsideredInsts.insert(I))
>> > +  if (!ConsideredInsts.insert(I).second)
>> >     return false;
>> >
>> >   // If this is an obviously unfoldable instruction, bail out.
>> > @@ -2615,7 +2615,7 @@ bool CodeGenPrepare::OptimizeMemoryInst(
>> >     worklist.pop_back();
>> >
>> >     // Break use-def graph loops.
>> > -    if (!Visited.insert(V)) {
>> > +    if (!Visited.insert(V).second) {
>> >       Consensus = nullptr;
>> >       break;
>> >     }
>> >
>> > Modified: llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -245,7 +245,7 @@ bool SSAIfConv::canSpeculateInstrs(Machi
>> >       MachineInstr *DefMI = MRI->getVRegDef(Reg);
>> >       if (!DefMI || DefMI->getParent() != Head)
>> >         continue;
>> > -      if (InsertAfter.insert(DefMI))
>> > +      if (InsertAfter.insert(DefMI).second)
>> >         DEBUG(dbgs() << "BB#" << MBB->getNumber() << " depends on " <<
>> *DefMI);
>> >       if (DefMI->isTerminator()) {
>> >         DEBUG(dbgs() << "Can't insert instructions below
>> terminator.\n");
>> >
>> > Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Wed Nov 19 01:49:26 2014
>> > @@ -823,7 +823,7 @@ void InlineSpiller::markValueUsed(LiveIn
>> >   WorkList.push_back(std::make_pair(LI, VNI));
>> >   do {
>> >     std::tie(LI, VNI) = WorkList.pop_back_val();
>> > -    if (!UsedValues.insert(VNI))
>> > +    if (!UsedValues.insert(VNI).second)
>> >       continue;
>> >
>> >     if (VNI->isPHIDef()) {
>> >
>> > Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Wed Nov 19 01:49:26 2014
>> > @@ -206,7 +206,7 @@ void LiveRange::RenumberValues() {
>> >   valnos.clear();
>> >   for (const_iterator I = begin(), E = end(); I != E; ++I) {
>> >     VNInfo *VNI = I->valno;
>> > -    if (!Seen.insert(VNI))
>> > +    if (!Seen.insert(VNI).second)
>> >       continue;
>> >     assert(!VNI->isUnused() && "Unused valno used by live segment");
>> >     VNI->id = (unsigned)valnos.size();
>> >
>> > Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -379,12 +379,13 @@ bool LiveIntervals::shrinkToUses(LiveInt
>> >       (void)ExtVNI;
>> >       assert(ExtVNI == VNI && "Unexpected existing value number");
>> >       // Is this a PHIDef we haven't seen before?
>> > -      if (!VNI->isPHIDef() || VNI->def != BlockStart ||
>> !UsedPHIs.insert(VNI))
>> > +      if (!VNI->isPHIDef() || VNI->def != BlockStart ||
>> > +          !UsedPHIs.insert(VNI).second)
>> >         continue;
>> >       // The PHI is live, make sure the predecessors are live-out.
>> >       for (MachineBasicBlock::const_pred_iterator PI =
>> MBB->pred_begin(),
>> >            PE = MBB->pred_end(); PI != PE; ++PI) {
>> > -        if (!LiveOut.insert(*PI))
>> > +        if (!LiveOut.insert(*PI).second)
>> >           continue;
>> >         SlotIndex Stop = getMBBEndIdx(*PI);
>> >         // A predecessor is not required to have a live-out value for a
>> PHI.
>> > @@ -401,7 +402,7 @@ bool LiveIntervals::shrinkToUses(LiveInt
>> >     // Make sure VNI is live-out from the predecessors.
>> >     for (MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(),
>> >          PE = MBB->pred_end(); PI != PE; ++PI) {
>> > -      if (!LiveOut.insert(*PI))
>> > +      if (!LiveOut.insert(*PI).second)
>> >         continue;
>> >       SlotIndex Stop = getMBBEndIdx(*PI);
>> >       assert(li->getVNInfoBefore(Stop) == VNI &&
>> > @@ -784,7 +785,7 @@ private:
>> >   /// Update a single live range, assuming an instruction has been
>> moved from
>> >   /// OldIdx to NewIdx.
>> >   void updateRange(LiveRange &LR, unsigned Reg) {
>> > -    if (!Updated.insert(&LR))
>> > +    if (!Updated.insert(&LR).second)
>> >       return;
>> >     DEBUG({
>> >       dbgs() << "     ";
>> >
>> > Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -1066,7 +1066,7 @@ bool MachineBasicBlock::CorrectExtraCFGE
>> >   MachineBasicBlock::succ_iterator SI = succ_begin();
>> >   while (SI != succ_end()) {
>> >     const MachineBasicBlock *MBB = *SI;
>> > -    if (!SeenMBBs.insert(MBB) ||
>> > +    if (!SeenMBBs.insert(MBB).second ||
>> >         (MBB != DestA && MBB != DestB && !MBB->isLandingPad())) {
>> >       // This is a superfluous edge, remove it.
>> >       SI = removeSuccessor(SI);
>> >
>> > Modified: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -813,7 +813,7 @@ void MachineBlockPlacement::buildLoopCha
>> >                                    BE = L.block_end();
>> >        BI != BE; ++BI) {
>> >     BlockChain &Chain = *BlockToChain[*BI];
>> > -    if (!UpdatedPreds.insert(&Chain))
>> > +    if (!UpdatedPreds.insert(&Chain).second)
>> >       continue;
>> >
>> >     assert(Chain.LoopPredecessors == 0);
>> > @@ -914,7 +914,7 @@ void MachineBlockPlacement::buildCFGChai
>> >   for (MachineFunction::iterator FI = F.begin(), FE = F.end(); FI !=
>> FE; ++FI) {
>> >     MachineBasicBlock *BB = &*FI;
>> >     BlockChain &Chain = *BlockToChain[BB];
>> > -    if (!UpdatedPreds.insert(&Chain))
>> > +    if (!UpdatedPreds.insert(&Chain).second)
>> >       continue;
>> >
>> >     assert(Chain.LoopPredecessors == 0);
>> >
>> > Modified: llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -141,7 +141,7 @@ void llvm::finalizeBundle(MachineBasicBl
>> >           // Internal def is now killed.
>> >           KilledDefSet.insert(Reg);
>> >       } else {
>> > -        if (ExternUseSet.insert(Reg)) {
>> > +        if (ExternUseSet.insert(Reg).second) {
>> >           ExternUses.push_back(Reg);
>> >           if (MO.isUndef())
>> >             UndefUseSet.insert(Reg);
>> > @@ -158,7 +158,7 @@ void llvm::finalizeBundle(MachineBasicBl
>> >       if (!Reg)
>> >         continue;
>> >
>> > -      if (LocalDefSet.insert(Reg)) {
>> > +      if (LocalDefSet.insert(Reg).second) {
>> >         LocalDefs.push_back(Reg);
>> >         if (MO.isDead()) {
>> >           DeadDefSet.insert(Reg);
>> > @@ -174,7 +174,7 @@ void llvm::finalizeBundle(MachineBasicBl
>> >       if (!MO.isDead()) {
>> >         for (MCSubRegIterator SubRegs(Reg, TRI); SubRegs.isValid();
>> ++SubRegs) {
>> >           unsigned SubReg = *SubRegs;
>> > -          if (LocalDefSet.insert(SubReg))
>> > +          if (LocalDefSet.insert(SubReg).second)
>> >             LocalDefs.push_back(SubReg);
>> >         }
>> >       }
>> > @@ -186,7 +186,7 @@ void llvm::finalizeBundle(MachineBasicBl
>> >   SmallSet<unsigned, 32> Added;
>> >   for (unsigned i = 0, e = LocalDefs.size(); i != e; ++i) {
>> >     unsigned Reg = LocalDefs[i];
>> > -    if (Added.insert(Reg)) {
>> > +    if (Added.insert(Reg).second) {
>> >       // If it's not live beyond end of the bundle, mark it dead.
>> >       bool isDead = DeadDefSet.count(Reg) || KilledDefSet.count(Reg);
>> >       MIB.addReg(Reg, getDefRegState(true) | getDeadRegState(isDead) |
>> >
>> > Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Wed Nov 19 01:49:26 2014
>> > @@ -818,7 +818,7 @@ void MachineLICM::InitRegPressure(Machin
>> >       if (!TargetRegisterInfo::isVirtualRegister(Reg))
>> >         continue;
>> >
>> > -      bool isNew = RegSeen.insert(Reg);
>> > +      bool isNew = RegSeen.insert(Reg).second;
>> >       unsigned RCId, RCCost;
>> >       getRegisterClassIDAndCost(MI, Reg, i, RCId, RCCost);
>> >       if (MO.isDef())
>> > @@ -850,7 +850,7 @@ void MachineLICM::UpdateRegPressure(cons
>> >     if (!TargetRegisterInfo::isVirtualRegister(Reg))
>> >       continue;
>> >
>> > -    bool isNew = RegSeen.insert(Reg);
>> > +    bool isNew = RegSeen.insert(Reg).second;
>> >     if (MO.isDef())
>> >       Defs.push_back(Reg);
>> >     else if (!isNew && isOperandKill(MO, MRI)) {
>> >
>> > Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/MachineSink.cpp Wed Nov 19 01:49:26 2014
>> > @@ -340,7 +340,7 @@ bool MachineSinking::isWorthBreakingCrit
>> >   // If the pass has already considered breaking this edge (during this
>> pass
>> >   // through the function), then let's go ahead and break it. This means
>> >   // sinking multiple "cheap" instructions into the same block.
>> > -  if (!CEBCandidates.insert(std::make_pair(From, To)))
>> > +  if (!CEBCandidates.insert(std::make_pair(From, To)).second)
>> >     return true;
>> >
>> >   if (!MI->isCopy() && !TII->isAsCheapAsAMove(MI))
>> >
>> > Modified: llvm/trunk/lib/CodeGen/MachineTraceMetrics.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineTraceMetrics.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/MachineTraceMetrics.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/MachineTraceMetrics.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -449,7 +449,7 @@ public:
>> >     }
>> >     // To is a new block. Mark the block as visited in case the CFG has
>> cycles
>> >     // that MachineLoopInfo didn't recognize as a natural loop.
>> > -    return LB.Visited.insert(To);
>> > +    return LB.Visited.insert(To).second;
>> >   }
>> > };
>> > }
>> >
>> > Modified: llvm/trunk/lib/CodeGen/OptimizePHIs.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/OptimizePHIs.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/OptimizePHIs.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/OptimizePHIs.cpp Wed Nov 19 01:49:26 2014
>> > @@ -92,7 +92,7 @@ bool OptimizePHIs::IsSingleValuePHICycle
>> >   unsigned DstReg = MI->getOperand(0).getReg();
>> >
>> >   // See if we already saw this register.
>> > -  if (!PHIsInCycle.insert(MI))
>> > +  if (!PHIsInCycle.insert(MI).second)
>> >     return true;
>> >
>> >   // Don't scan crazily complex things.
>> > @@ -137,7 +137,7 @@ bool OptimizePHIs::IsDeadPHICycle(Machin
>> >          "PHI destination is not a virtual register");
>> >
>> >   // See if we already saw this register.
>> > -  if (!PHIsInCycle.insert(MI))
>> > +  if (!PHIsInCycle.insert(MI).second)
>> >     return true;
>> >
>> >   // Don't scan crazily complex things.
>> >
>> > Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Wed Nov 19 01:49:26 2014
>> > @@ -367,7 +367,7 @@ void PHIElimination::LowerPHINode(Machin
>> >     // Check to make sure we haven't already emitted the copy for this
>> block.
>> >     // This can happen because PHI nodes may have multiple entries for
>> the same
>> >     // basic block.
>> > -    if (!MBBsInsertedInto.insert(&opBlock))
>> > +    if (!MBBsInsertedInto.insert(&opBlock).second)
>> >       continue;  // If the copy has already been emitted, we're done.
>> >
>> >     // Find a safe location to insert the copy, this may be the first
>> terminator
>> >
>> > Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Wed Nov 19 01:49:26 2014
>> > @@ -708,7 +708,7 @@ void RAFast::handleThroughOperands(Machi
>> >       continue;
>> >     if (MO.isEarlyClobber() || MI->isRegTiedToDefOperand(i) ||
>> >         (MO.getSubReg() && MI->readsVirtualRegister(Reg))) {
>> > -      if (ThroughRegs.insert(Reg))
>> > +      if (ThroughRegs.insert(Reg).second)
>> >         DEBUG(dbgs() << ' ' << PrintReg(Reg));
>> >     }
>> >   }
>> >
>> > Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -965,7 +965,7 @@ void RegisterCoalescer::updateRegDefsUse
>> >     // the UseMI operands removes them from the SrcReg use-def chain,
>> but when
>> >     // SrcReg is DstReg we could encounter UseMI twice if it has
>> multiple
>> >     // operands mentioning the virtual register.
>> > -    if (SrcReg == DstReg && !Visited.insert(UseMI))
>> > +    if (SrcReg == DstReg && !Visited.insert(UseMI).second)
>> >       continue;
>> >
>> >     SmallVector<unsigned,8> Ops;
>> >
>> > Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -109,7 +109,7 @@ static void getUnderlyingObjects(const V
>> >     for (SmallVectorImpl<Value *>::iterator I = Objs.begin(), IE =
>> Objs.end();
>> >          I != IE; ++I) {
>> >       V = *I;
>> > -      if (!Visited.insert(V))
>> > +      if (!Visited.insert(V).second)
>> >         continue;
>> >       if (Operator::getOpcode(V) == Instruction::IntToPtr) {
>> >         const Value *O =
>> > @@ -588,7 +588,7 @@ iterateChainSucc(AliasAnalysis *AA, cons
>> >     return *Depth;
>> >
>> >   // Remember visited nodes.
>> > -  if (!Visited.insert(SUb))
>> > +  if (!Visited.insert(SUb).second)
>> >       return *Depth;
>> >   // If there is _some_ dependency already in place, do not
>> >   // descend any further.
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1493,7 +1493,7 @@ SDValue DAGCombiner::visitTokenFactor(SD
>> >
>> >       default:
>> >         // Only add if it isn't already in the list.
>> > -        if (SeenOps.insert(Op.getNode()))
>> > +        if (SeenOps.insert(Op.getNode()).second)
>> >           Ops.push_back(Op);
>> >         else
>> >           Changed = true;
>> > @@ -12267,7 +12267,7 @@ void DAGCombiner::GatherAllAliases(SDNod
>> >     }
>> >
>> >     // Don't bother if we've been before.
>> > -    if (!Visited.insert(Chain.getNode()))
>> > +    if (!Visited.insert(Chain.getNode()).second)
>> >       continue;
>> >
>> >     switch (Chain.getOpcode()) {
>> > @@ -12355,7 +12355,8 @@ void DAGCombiner::GatherAllAliases(SDNod
>> >
>> >     for (SDNode::use_iterator UI = M->use_begin(),
>> >          UIE = M->use_end(); UI != UIE; ++UI)
>> > -      if (UI.getUse().getValueType() == MVT::Other &&
>> Visited.insert(*UI)) {
>> > +      if (UI.getUse().getValueType() == MVT::Other &&
>> > +          Visited.insert(*UI).second) {
>> >         if (isa<MemIntrinsicSDNode>(*UI) || isa<MemSDNode>(*UI)) {
>> >           // We've not visited this use, and we care about it (it could
>> have an
>> >           // ordering dependency with the original node).
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1976,7 +1976,7 @@ bool FastISel::handlePHINodesInSuccessor
>> >
>> >     // If this terminator has multiple identical successors (common for
>> >     // switches), only handle each succ once.
>> > -    if (!SuccsHandled.insert(SuccMBB))
>> > +    if (!SuccsHandled.insert(SuccMBB).second)
>> >       continue;
>> >
>> >     MachineBasicBlock::iterator MBBI = SuccMBB->begin();
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -4343,7 +4343,7 @@ void SelectionDAG::Legalize() {
>> >         continue;
>> >       }
>> >
>> > -      if (LegalizedNodes.insert(N)) {
>> > +      if (LegalizedNodes.insert(N).second) {
>> >         AnyLegalized = true;
>> >         Legalizer.LegalizeOp(N);
>> >
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -460,7 +460,7 @@ static bool CheckForLiveRegDef(SUnit *SU
>> >   bool Added = false;
>> >   for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) {
>> >     if (LiveRegDefs[*AI] && LiveRegDefs[*AI] != SU) {
>> > -      if (RegAdded.insert(*AI)) {
>> > +      if (RegAdded.insert(*AI).second) {
>> >         LRegs.push_back(*AI);
>> >         Added = true;
>> >       }
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed Nov
>> 19 01:49:26 2014
>> > @@ -1223,7 +1223,7 @@ static void CheckForLiveRegDef(SUnit *SU
>> >     if (LiveRegDefs[*AliasI] == SU) continue;
>> >
>> >     // Add Reg to the set of interfering live regs.
>> > -    if (RegAdded.insert(*AliasI)) {
>> > +    if (RegAdded.insert(*AliasI).second) {
>> >       LRegs.push_back(*AliasI);
>> >     }
>> >   }
>> > @@ -1240,7 +1240,7 @@ static void CheckForLiveRegDefMasked(SUn
>> >     if (!LiveRegDefs[i]) continue;
>> >     if (LiveRegDefs[i] == SU) continue;
>> >     if (!MachineOperand::clobbersPhysReg(RegMask, i)) continue;
>> > -    if (RegAdded.insert(i))
>> > +    if (RegAdded.insert(i).second)
>> >       LRegs.push_back(i);
>> >   }
>> > }
>> > @@ -1315,7 +1315,8 @@ DelayForLiveRegsBottomUp(SUnit *SU, Smal
>> >         SDNode *Gen = LiveRegGens[CallResource]->getNode();
>> >         while (SDNode *Glued = Gen->getGluedNode())
>> >           Gen = Glued;
>> > -        if (!IsChainDependent(Gen, Node, 0, TII) &&
>> RegAdded.insert(CallResource))
>> > +        if (!IsChainDependent(Gen, Node, 0, TII) &&
>> > +            RegAdded.insert(CallResource).second)
>> >           LRegs.push_back(CallResource);
>> >       }
>> >     }
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
>> (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Wed Nov
>> 19 01:49:26 2014
>> > @@ -230,7 +230,7 @@ void ScheduleDAGSDNodes::ClusterNeighbor
>> >   for (SDNode::use_iterator I = Chain->use_begin(), E =
>> Chain->use_end();
>> >        I != E && UseCount < 100; ++I, ++UseCount) {
>> >     SDNode *User = *I;
>> > -    if (User == Node || !Visited.insert(User))
>> > +    if (User == Node || !Visited.insert(User).second)
>> >       continue;
>> >     int64_t Offset1, Offset2;
>> >     if (!TII->areLoadsFromSameBasePtr(Base, User, Offset1, Offset2) ||
>> > @@ -343,7 +343,7 @@ void ScheduleDAGSDNodes::BuildSchedUnits
>> >
>> >     // Add all operands to the worklist unless they've already been
>> added.
>> >     for (unsigned i = 0, e = NI->getNumOperands(); i != e; ++i)
>> > -      if (Visited.insert(NI->getOperand(i).getNode()))
>> > +      if (Visited.insert(NI->getOperand(i).getNode()).second)
>> >         Worklist.push_back(NI->getOperand(i).getNode());
>> >
>> >     if (isPassiveNode(NI))  // Leaf node, e.g. a TargetImmediate.
>> > @@ -737,7 +737,7 @@ ProcessSourceNode(SDNode *N, SelectionDA
>> >                   SmallVectorImpl<std::pair<unsigned, MachineInstr*> >
>> &Orders,
>> >                   SmallSet<unsigned, 8> &Seen) {
>> >   unsigned Order = N->getIROrder();
>> > -  if (!Order || !Seen.insert(Order)) {
>> > +  if (!Order || !Seen.insert(Order).second) {
>> >     // Process any valid SDDbgValues even if node does not have any
>> order
>> >     // assigned.
>> >     ProcessSDDbgValues(N, DAG, Emitter, Orders, VRBaseMap, 0);
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -6385,7 +6385,7 @@ SDNode::hasPredecessorHelper(const SDNod
>> >     const SDNode *M = Worklist.pop_back_val();
>> >     for (unsigned i = 0, e = M->getNumOperands(); i != e; ++i) {
>> >       SDNode *Op = M->getOperand(i).getNode();
>> > -      if (Visited.insert(Op))
>> > +      if (Visited.insert(Op).second)
>> >         Worklist.push_back(Op);
>> >       if (Op == N)
>> >         return true;
>> > @@ -6753,7 +6753,7 @@ static void checkForCyclesHelper(const S
>> >
>> >   // If a node has already been visited on this depth-first walk,
>> reject it as
>> >   // a cycle.
>> > -  if (!Visited.insert(N)) {
>> > +  if (!Visited.insert(N).second) {
>> >     errs() << "Detected cycle in SelectionDAG\n";
>> >     dbgs() << "Offending node:\n";
>> >     N->dumprFull(DAG); dbgs() << "\n";
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>> (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Nov
>> 19 01:49:26 2014
>> > @@ -2760,7 +2760,7 @@ void SelectionDAGBuilder::visitIndirectB
>> >   SmallSet<BasicBlock*, 32> Done;
>> >   for (unsigned i = 0, e = I.getNumSuccessors(); i != e; ++i) {
>> >     BasicBlock *BB = I.getSuccessor(i);
>> > -    bool Inserted = Done.insert(BB);
>> > +    bool Inserted = Done.insert(BB).second;
>> >     if (!Inserted)
>> >         continue;
>> >
>> > @@ -7697,7 +7697,8 @@ SelectionDAGBuilder::HandlePHINodesInSuc
>> >
>> >     // If this terminator has multiple identical successors (common for
>> >     // switches), only handle each succ once.
>> > -    if (!SuccsHandled.insert(SuccMBB)) continue;
>> > +    if (!SuccsHandled.insert(SuccMBB).second)
>> > +      continue;
>> >
>> >     MachineBasicBlock::iterator MBBI = SuccMBB->begin();
>> >
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
>> (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp Wed Nov
>> 19 01:49:26 2014
>> > @@ -569,7 +569,7 @@ void SDNode::printr(raw_ostream &OS, con
>> > typedef SmallPtrSet<const SDNode *, 128> VisitedSDNodeSet;
>> > static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned
>> indent,
>> >                        const SelectionDAG *G, VisitedSDNodeSet &once) {
>> > -  if (!once.insert(N))          // If we've been here before, return
>> now.
>> > +  if (!once.insert(N).second) // If we've been here before, return now.
>> >     return;
>> >
>> >   // Dump the current SDNode, but don't end the line yet.
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -615,7 +615,7 @@ void SelectionDAGISel::ComputeLiveOutVRe
>> >     SDNode *N = Worklist.pop_back_val();
>> >
>> >     // If we've already seen this node, ignore it.
>> > -    if (!VisitedNodes.insert(N))
>> > +    if (!VisitedNodes.insert(N).second)
>> >       continue;
>> >
>> >     // Otherwise, add all chain operands to the worklist.
>> > @@ -1741,7 +1741,7 @@ static bool findNonImmUse(SDNode *Use, S
>> >
>> >   // Don't revisit nodes if we already scanned it and didn't fail, we
>> know we
>> >   // won't fail if we scan it again.
>> > -  if (!Visited.insert(Use))
>> > +  if (!Visited.insert(Use).second)
>> >     return false;
>> >
>> >   for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) {
>> >
>> > Modified: llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp Wed Nov 19 01:49:26 2014
>> > @@ -140,7 +140,7 @@ void SjLjEHPrepare::insertCallSiteStore(
>> > /// we reach blocks we've already seen.
>> > static void MarkBlocksLiveIn(BasicBlock *BB,
>> >                              SmallPtrSetImpl<BasicBlock *> &LiveBBs) {
>> > -  if (!LiveBBs.insert(BB))
>> > +  if (!LiveBBs.insert(BB).second)
>> >     return; // already been here.
>> >
>> >   for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E;
>> ++PI)
>> >
>> > Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/StackProtector.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/StackProtector.cpp Wed Nov 19 01:49:26 2014
>> > @@ -169,7 +169,7 @@ bool StackProtector::HasAddressTaken(con
>> >     } else if (const PHINode *PN = dyn_cast<PHINode>(U)) {
>> >       // Keep track of what PHI nodes we have already visited to ensure
>> >       // they are only visited once.
>> > -      if (VisitedPHIs.insert(PN))
>> > +      if (VisitedPHIs.insert(PN).second)
>> >         if (HasAddressTaken(PN))
>> >           return true;
>> >     } else if (const GetElementPtrInst *GEP =
>> dyn_cast<GetElementPtrInst>(U)) {
>> >
>> > Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -678,7 +678,7 @@ TwoAddressInstructionPass::scanUses(unsi
>> >   unsigned Reg = DstReg;
>> >   while (MachineInstr *UseMI = findOnlyInterestingUse(Reg, MBB, MRI,
>> TII,IsCopy,
>> >                                                       NewReg,
>> IsDstPhys)) {
>> > -    if (IsCopy && !Processed.insert(UseMI))
>> > +    if (IsCopy && !Processed.insert(UseMI).second)
>> >       break;
>> >
>> >     DenseMap<MachineInstr*, unsigned>::iterator DI =
>> DistanceMap.find(UseMI);
>> >
>> > Modified: llvm/trunk/lib/IR/Constants.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Constants.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/IR/Constants.cpp (original)
>> > +++ llvm/trunk/lib/IR/Constants.cpp Wed Nov 19 01:49:26 2014
>> > @@ -316,7 +316,7 @@ static bool canTrapImpl(const Constant *
>> >   // ConstantExpr traps if any operands can trap.
>> >   for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) {
>> >     if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) {
>> > -      if (NonTrappingOps.insert(Op) && canTrapImpl(Op, NonTrappingOps))
>> > +      if (NonTrappingOps.insert(Op).second && canTrapImpl(Op,
>> NonTrappingOps))
>> >         return true;
>> >     }
>> >   }
>> > @@ -363,7 +363,7 @@ ConstHasGlobalValuePredicate(const Const
>> >       const Constant *ConstOp = dyn_cast<Constant>(Op);
>> >       if (!ConstOp)
>> >         continue;
>> > -      if (Visited.insert(ConstOp))
>> > +      if (Visited.insert(ConstOp).second)
>> >         WorkList.push_back(ConstOp);
>> >     }
>> >   }
>> >
>> > Modified: llvm/trunk/lib/IR/DIBuilder.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/IR/DIBuilder.cpp (original)
>> > +++ llvm/trunk/lib/IR/DIBuilder.cpp Wed Nov 19 01:49:26 2014
>> > @@ -64,7 +64,7 @@ void DIBuilder::finalize() {
>> >   // TrackingVHs back into Values.
>> >   SmallPtrSet<Value *, 16> RetainSet;
>> >   for (unsigned I = 0, E = AllRetainTypes.size(); I < E; I++)
>> > -    if (RetainSet.insert(AllRetainTypes[I]))
>> > +    if (RetainSet.insert(AllRetainTypes[I]).second)
>> >       RetainValues.push_back(AllRetainTypes[I]);
>> >   DIArray RetainTypes = getOrCreateArray(RetainValues);
>> >   DIType(TempRetainTypes).replaceAllUsesWith(RetainTypes);
>> >
>> > Modified: llvm/trunk/lib/IR/DebugInfo.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/IR/DebugInfo.cpp (original)
>> > +++ llvm/trunk/lib/IR/DebugInfo.cpp Wed Nov 19 01:49:26 2014
>> > @@ -1127,7 +1127,7 @@ void DebugInfoFinder::processDeclare(con
>> >   if (!DV.isVariable())
>> >     return;
>> >
>> > -  if (!NodesSeen.insert(DV))
>> > +  if (!NodesSeen.insert(DV).second)
>> >     return;
>> >   processScope(DIVariable(N).getContext());
>> >   processType(DIVariable(N).getType().resolve(TypeIdentifierMap));
>> > @@ -1143,7 +1143,7 @@ void DebugInfoFinder::processValue(const
>> >   if (!DV.isVariable())
>> >     return;
>> >
>> > -  if (!NodesSeen.insert(DV))
>> > +  if (!NodesSeen.insert(DV).second)
>> >     return;
>> >   processScope(DIVariable(N).getContext());
>> >   processType(DIVariable(N).getType().resolve(TypeIdentifierMap));
>> > @@ -1153,7 +1153,7 @@ bool DebugInfoFinder::addType(DIType DT)
>> >   if (!DT)
>> >     return false;
>> >
>> > -  if (!NodesSeen.insert(DT))
>> > +  if (!NodesSeen.insert(DT).second)
>> >     return false;
>> >
>> >   TYs.push_back(DT);
>> > @@ -1163,7 +1163,7 @@ bool DebugInfoFinder::addType(DIType DT)
>> > bool DebugInfoFinder::addCompileUnit(DICompileUnit CU) {
>> >   if (!CU)
>> >     return false;
>> > -  if (!NodesSeen.insert(CU))
>> > +  if (!NodesSeen.insert(CU).second)
>> >     return false;
>> >
>> >   CUs.push_back(CU);
>> > @@ -1174,7 +1174,7 @@ bool DebugInfoFinder::addGlobalVariable(
>> >   if (!DIG)
>> >     return false;
>> >
>> > -  if (!NodesSeen.insert(DIG))
>> > +  if (!NodesSeen.insert(DIG).second)
>> >     return false;
>> >
>> >   GVs.push_back(DIG);
>> > @@ -1185,7 +1185,7 @@ bool DebugInfoFinder::addSubprogram(DISu
>> >   if (!SP)
>> >     return false;
>> >
>> > -  if (!NodesSeen.insert(SP))
>> > +  if (!NodesSeen.insert(SP).second)
>> >     return false;
>> >
>> >   SPs.push_back(SP);
>> > @@ -1199,7 +1199,7 @@ bool DebugInfoFinder::addScope(DIScope S
>> >   // as null for now.
>> >   if (Scope->getNumOperands() == 0)
>> >     return false;
>> > -  if (!NodesSeen.insert(Scope))
>> > +  if (!NodesSeen.insert(Scope).second)
>> >     return false;
>> >   Scopes.push_back(Scope);
>> >   return true;
>> >
>> > Modified: llvm/trunk/lib/IR/Type.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Type.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/IR/Type.cpp (original)
>> > +++ llvm/trunk/lib/IR/Type.cpp Wed Nov 19 01:49:26 2014
>> > @@ -562,7 +562,7 @@ bool StructType::isSized(SmallPtrSetImpl
>> >   if (isOpaque())
>> >     return false;
>> >
>> > -  if (Visited && !Visited->insert(this))
>> > +  if (Visited && !Visited->insert(this).second)
>> >     return false;
>> >
>> >   // Okay, our struct is sized if all of the elements are, but if one
>> of the
>> >
>> > Modified: llvm/trunk/lib/IR/Value.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/IR/Value.cpp (original)
>> > +++ llvm/trunk/lib/IR/Value.cpp Wed Nov 19 01:49:26 2014
>> > @@ -292,7 +292,7 @@ void Value::takeName(Value *V) {
>> > #ifndef NDEBUG
>> > static bool contains(SmallPtrSetImpl<ConstantExpr *> &Cache,
>> ConstantExpr *Expr,
>> >                      Constant *C) {
>> > -  if (!Cache.insert(Expr))
>> > +  if (!Cache.insert(Expr).second)
>> >     return false;
>> >
>> >   for (auto &O : Expr->operands()) {
>> > @@ -401,7 +401,7 @@ static Value *stripPointerCastsAndOffset
>> >       return V;
>> >     }
>> >     assert(V->getType()->isPointerTy() && "Unexpected operand type!");
>> > -  } while (Visited.insert(V));
>> > +  } while (Visited.insert(V).second);
>> >
>> >   return V;
>> > }
>> > @@ -451,7 +451,7 @@ Value *Value::stripAndAccumulateInBounds
>> >       return V;
>> >     }
>> >     assert(V->getType()->isPointerTy() && "Unexpected operand type!");
>> > -  } while (Visited.insert(V));
>> > +  } while (Visited.insert(V).second);
>> >
>> >   return V;
>> > }
>> > @@ -522,7 +522,7 @@ static bool isDereferenceablePointer(con
>> >   // For GEPs, determine if the indexing lands within the allocated
>> object.
>> >   if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
>> >     // Conservatively require that the base pointer be fully
>> dereferenceable.
>> > -    if (!Visited.insert(GEP->getOperand(0)))
>> > +    if (!Visited.insert(GEP->getOperand(0)).second)
>> >       return false;
>> >     if (!isDereferenceablePointer(GEP->getOperand(0), DL, Visited))
>> >       return false;
>> >
>> > Modified: llvm/trunk/lib/IR/Verifier.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/IR/Verifier.cpp (original)
>> > +++ llvm/trunk/lib/IR/Verifier.cpp Wed Nov 19 01:49:26 2014
>> > @@ -480,7 +480,7 @@ void Verifier::visitGlobalVariable(const
>> >
>> >   while (!WorkStack.empty()) {
>> >     const Value *V = WorkStack.pop_back_val();
>> > -    if (!Visited.insert(V))
>> > +    if (!Visited.insert(V).second)
>> >       continue;
>> >
>> >     if (const User *U = dyn_cast<User>(V)) {
>> > @@ -510,7 +510,7 @@ void Verifier::visitAliaseeSubExpr(Small
>> >     Assert1(!GV->isDeclaration(), "Alias must point to a definition",
>> &GA);
>> >
>> >     if (const auto *GA2 = dyn_cast<GlobalAlias>(GV)) {
>> > -      Assert1(Visited.insert(GA2), "Aliases cannot form a cycle", &GA);
>> > +      Assert1(Visited.insert(GA2).second, "Aliases cannot form a
>> cycle", &GA);
>> >
>> >       Assert1(!GA2->mayBeOverridden(), "Alias cannot point to a weak
>> alias",
>> >               &GA);
>> > @@ -568,7 +568,7 @@ void Verifier::visitNamedMDNode(const Na
>> > void Verifier::visitMDNode(MDNode &MD, Function *F) {
>> >   // Only visit each node once.  Metadata can be mutually recursive, so
>> this
>> >   // avoids infinite recursion here, as well as being an optimization.
>> > -  if (!MDNodes.insert(&MD))
>> > +  if (!MDNodes.insert(&MD).second)
>> >     return;
>> >
>> >   for (unsigned i = 0, e = MD.getNumOperands(); i != e; ++i) {
>> > @@ -1218,7 +1218,7 @@ void Verifier::visitSwitchInst(SwitchIns
>> >   for (SwitchInst::CaseIt i = SI.case_begin(), e = SI.case_end(); i !=
>> e; ++i) {
>> >     Assert1(i.getCaseValue()->getType() == SwitchTy,
>> >             "Switch constants must all be same type as switch value!",
>> &SI);
>> > -    Assert2(Constants.insert(i.getCaseValue()),
>> > +    Assert2(Constants.insert(i.getCaseValue()).second,
>> >             "Duplicate integer as switch case", &SI, i.getCaseValue());
>> >   }
>> >
>> > @@ -2253,7 +2253,7 @@ void Verifier::visitInstruction(Instruct
>> >
>> >         while (!Stack.empty()) {
>> >           const ConstantExpr *V = Stack.pop_back_val();
>> > -          if (!Visited.insert(V))
>> > +          if (!Visited.insert(V).second)
>> >             continue;
>> >
>> >           VerifyConstantExprBitcastType(V);
>> >
>> > Modified: llvm/trunk/lib/Linker/LinkModules.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Linker/LinkModules.cpp (original)
>> > +++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Nov 19 01:49:26 2014
>> > @@ -152,7 +152,7 @@ bool TypeMapTy::areTypesIsomorphic(Type
>> >     // same opaque type then we fail.
>> >     if (cast<StructType>(DstTy)->isOpaque()) {
>> >       // We can only map one source type onto the opaque destination
>> type.
>> > -      if (!DstResolvedOpaqueTypes.insert(cast<StructType>(DstTy)))
>> > +      if
>> (!DstResolvedOpaqueTypes.insert(cast<StructType>(DstTy)).second)
>> >         return false;
>> >       SrcDefinitionsToResolve.push_back(SSTy);
>> >       Entry = DstTy;
>> >
>> > Modified: llvm/trunk/lib/Support/CommandLine.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Support/CommandLine.cpp (original)
>> > +++ llvm/trunk/lib/Support/CommandLine.cpp Wed Nov 19 01:49:26 2014
>> > @@ -1455,7 +1455,7 @@ sortOpts(StringMap<Option*> &OptMap,
>> >       continue;
>> >
>> >     // If we've already seen this option, don't add it to the list
>> again.
>> > -    if (!OptionSet.insert(I->second))
>> > +    if (!OptionSet.insert(I->second).second)
>> >       continue;
>> >
>> >     Opts.push_back(std::pair<const char *, Option*>(I->getKey().data(),
>> >
>> > Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Support/SmallPtrSet.cpp (original)
>> > +++ llvm/trunk/lib/Support/SmallPtrSet.cpp Wed Nov 19 01:49:26 2014
>> > @@ -34,18 +34,19 @@ void SmallPtrSetImplBase::shrink_and_cle
>> >   memset(CurArray, -1, CurArraySize*sizeof(void*));
>> > }
>> >
>> > -bool SmallPtrSetImplBase::insert_imp(const void * Ptr) {
>> > +std::pair<const void *const *, bool>
>> > +SmallPtrSetImplBase::insert_imp(const void *Ptr) {
>> >   if (isSmall()) {
>> >     // Check to see if it is already in the set.
>> >     for (const void **APtr = SmallArray, **E = SmallArray+NumElements;
>> >          APtr != E; ++APtr)
>> >       if (*APtr == Ptr)
>> > -        return false;
>> > -
>> > +        return std::make_pair(APtr, false);
>> > +
>> >     // Nope, there isn't.  If we stay small, just 'pushback' now.
>> >     if (NumElements < CurArraySize) {
>> >       SmallArray[NumElements++] = Ptr;
>> > -      return true;
>> > +      return std::make_pair(SmallArray + (NumElements - 1), true);
>> >     }
>> >     // Otherwise, hit the big set case, which will call grow.
>> >   }
>> > @@ -61,14 +62,15 @@ bool SmallPtrSetImplBase::insert_imp(con
>> >
>> >   // Okay, we know we have space.  Find a hash bucket.
>> >   const void **Bucket = const_cast<const void**>(FindBucketFor(Ptr));
>> > -  if (*Bucket == Ptr) return false; // Already inserted, good.
>> > -
>> > +  if (*Bucket == Ptr)
>> > +    return std::make_pair(Bucket, false); // Already inserted, good.
>> > +
>> >   // Otherwise, insert it!
>> >   if (*Bucket == getTombstoneMarker())
>> >     --NumTombstones;
>> >   *Bucket = Ptr;
>> >   ++NumElements;  // Track density.
>> > -  return true;
>> > +  return std::make_pair(Bucket, true);
>> > }
>> >
>> > bool SmallPtrSetImplBase::erase_imp(const void * Ptr) {
>> >
>> > Modified: llvm/trunk/lib/Target/AArch64/AArch64PromoteConstant.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64PromoteConstant.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Target/AArch64/AArch64PromoteConstant.cpp (original)
>> > +++ llvm/trunk/lib/Target/AArch64/AArch64PromoteConstant.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -569,7 +569,7 @@ bool AArch64PromoteConstant::runOnFuncti
>> >         // global. Do not promote constant expressions either, as they
>> may
>> >         // require some code expansion.
>> >         if (Cst && !isa<GlobalValue>(Cst) && !isa<ConstantExpr>(Cst) &&
>> > -            AlreadyChecked.insert(Cst))
>> > +            AlreadyChecked.insert(Cst).second)
>> >           LocalChange |= promoteConstant(Cst);
>> >       }
>> >     }
>> >
>> > Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
>> > +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -6943,7 +6943,7 @@ EmitSjLjDispatchBlock(MachineInstr *MI,
>> >   for (std::vector<MachineBasicBlock*>::iterator
>> >          I = LPadList.begin(), E = LPadList.end(); I != E; ++I) {
>> >     MachineBasicBlock *CurMBB = *I;
>> > -    if (SeenMBBs.insert(CurMBB))
>> > +    if (SeenMBBs.insert(CurMBB).second)
>> >       DispContBB->addSuccessor(CurMBB);
>> >   }
>> >
>> >
>> > Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
>> > +++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -455,7 +455,8 @@ bool MemDefsUses::hasHazard_(const Machi
>> >
>> > bool MemDefsUses::updateDefsUses(ValueType V, bool MayStore) {
>> >   if (MayStore)
>> > -    return !Defs.insert(V) || Uses.count(V) || SeenNoObjStore ||
>> SeenNoObjLoad;
>> > +    return !Defs.insert(V).second || Uses.count(V) || SeenNoObjStore ||
>> > +           SeenNoObjLoad;
>> >
>> >   Uses.insert(V);
>> >   return Defs.count(V) || SeenNoObjStore;
>> >
>> > Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
>> > +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -7649,7 +7649,7 @@ static bool findConsecutiveLoad(LoadSDNo
>> >   // nodes just above the top-level loads and token factors.
>> >   while (!Queue.empty()) {
>> >     SDNode *ChainNext = Queue.pop_back_val();
>> > -    if (!Visited.insert(ChainNext))
>> > +    if (!Visited.insert(ChainNext).second)
>> >       continue;
>> >
>> >     if (MemSDNode *ChainLD = dyn_cast<MemSDNode>(ChainNext)) {
>> > @@ -7680,7 +7680,7 @@ static bool findConsecutiveLoad(LoadSDNo
>> >
>> >     while (!Queue.empty()) {
>> >       SDNode *LoadRoot = Queue.pop_back_val();
>> > -      if (!Visited.insert(LoadRoot))
>> > +      if (!Visited.insert(LoadRoot).second)
>> >         continue;
>> >
>> >       if (MemSDNode *ChainLD = dyn_cast<MemSDNode>(LoadRoot))
>> > @@ -7810,7 +7810,7 @@ SDValue PPCTargetLowering::DAGCombineTru
>> >     SDValue BinOp = BinOps.back();
>> >     BinOps.pop_back();
>> >
>> > -    if (!Visited.insert(BinOp.getNode()))
>> > +    if (!Visited.insert(BinOp.getNode()).second)
>> >       continue;
>> >
>> >     PromOps.push_back(BinOp);
>> > @@ -8024,7 +8024,7 @@ SDValue PPCTargetLowering::DAGCombineExt
>> >     SDValue BinOp = BinOps.back();
>> >     BinOps.pop_back();
>> >
>> > -    if (!Visited.insert(BinOp.getNode()))
>> > +    if (!Visited.insert(BinOp.getNode()).second)
>> >       continue;
>> >
>> >     PromOps.push_back(BinOp);
>> >
>> > Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
>> > +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -330,7 +330,7 @@ bool FPS::runOnMachineFunction(MachineFu
>> >   // Process any unreachable blocks in arbitrary order now.
>> >   if (MF.size() != Processed.size())
>> >     for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB !=
>> E; ++BB)
>> > -      if (Processed.insert(BB))
>> > +      if (Processed.insert(BB).second)
>> >         Changed |= processBasicBlock(MF, *BB);
>> >
>> >   LiveBundles.clear();
>> >
>> > Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -182,7 +182,7 @@ bool ArgPromotion::canPaddingBeAccessed(
>> >     Value *V = WorkList.back();
>> >     WorkList.pop_back();
>> >     if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) {
>> > -      if (PtrValues.insert(V))
>> > +      if (PtrValues.insert(V).second)
>> >         WorkList.insert(WorkList.end(), V->user_begin(), V->user_end());
>> >     } else if (StoreInst *Store = dyn_cast<StoreInst>(V)) {
>> >       Stores.push_back(Store);
>> >
>> > Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -446,7 +446,7 @@ determinePointerReadAttrs(Argument *A,
>> >     case Instruction::AddrSpaceCast:
>> >       // The original value is not read/written via this if the new
>> value isn't.
>> >       for (Use &UU : I->uses())
>> > -        if (Visited.insert(&UU))
>> > +        if (Visited.insert(&UU).second)
>> >           Worklist.push_back(&UU);
>> >       break;
>> >
>> > @@ -460,7 +460,7 @@ determinePointerReadAttrs(Argument *A,
>> >       auto AddUsersToWorklistIfCapturing = [&] {
>> >         if (Captures)
>> >           for (Use &UU : I->uses())
>> > -            if (Visited.insert(&UU))
>> > +            if (Visited.insert(&UU).second)
>> >               Worklist.push_back(&UU);
>> >       };
>> >
>> >
>> > Modified: llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp Wed Nov 19 01:49:26 2014
>> > @@ -185,7 +185,7 @@ bool GlobalDCE::runOnModule(Module &M) {
>> > /// recursively mark anything that it uses as also needed.
>> > void GlobalDCE::GlobalIsNeeded(GlobalValue *G) {
>> >   // If the global is already in the set, no need to reprocess it.
>> > -  if (!AliveGlobals.insert(G))
>> > +  if (!AliveGlobals.insert(G).second)
>> >     return;
>> >
>> >   Module *M = G->getParent();
>> > @@ -238,7 +238,7 @@ void GlobalDCE::MarkUsedGlobalsAsNeeded(
>> >   for (User::op_iterator I = C->op_begin(), E = C->op_end(); I != E;
>> ++I) {
>> >     // If we've already processed this constant there's no need to do
>> it again.
>> >     Constant *Op = dyn_cast<Constant>(*I);
>> > -    if (Op && SeenConstants.insert(Op))
>> > +    if (Op && SeenConstants.insert(Op).second)
>> >       MarkUsedGlobalsAsNeeded(Op);
>> >   }
>> > }
>> >
>> > Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Wed Nov 19 01:49:26 2014
>> > @@ -639,7 +639,7 @@ static bool AllUsesOfValueWillTrapIfNull
>> >     } else if (const PHINode *PN = dyn_cast<PHINode>(U)) {
>> >       // If we've already seen this phi node, ignore it, it has already
>> been
>> >       // checked.
>> > -      if (PHIs.insert(PN) && !AllUsesOfValueWillTrapIfNull(PN, PHIs))
>> > +      if (PHIs.insert(PN).second && !AllUsesOfValueWillTrapIfNull(PN,
>> PHIs))
>> >         return false;
>> >     } else if (isa<ICmpInst>(U) &&
>> >                isa<ConstantPointerNull>(U->getOperand(1))) {
>> > @@ -982,7 +982,7 @@ static bool ValueIsOnlyUsedLocallyOrStor
>> >     if (const PHINode *PN = dyn_cast<PHINode>(Inst)) {
>> >       // PHIs are ok if all uses are ok.  Don't infinitely recurse
>> through PHI
>> >       // cycles.
>> > -      if (PHIs.insert(PN))
>> > +      if (PHIs.insert(PN).second)
>> >         if (!ValueIsOnlyUsedLocallyOrStoredToOneGlobal(PN, GV, PHIs))
>> >           return false;
>> >       continue;
>> > @@ -1073,11 +1073,11 @@ static bool LoadUsesSimpleEnoughForHeapS
>> >     }
>> >
>> >     if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
>> > -      if (!LoadUsingPHIsPerLoad.insert(PN))
>> > +      if (!LoadUsingPHIsPerLoad.insert(PN).second)
>> >         // This means some phi nodes are dependent on each other.
>> >         // Avoid infinite looping!
>> >         return false;
>> > -      if (!LoadUsingPHIs.insert(PN))
>> > +      if (!LoadUsingPHIs.insert(PN).second)
>> >         // If we have already analyzed this PHI, then it is safe.
>> >         continue;
>> >
>> > @@ -2045,7 +2045,8 @@ isSimpleEnoughValueToCommit(Constant *C,
>> >                             SmallPtrSetImpl<Constant*> &SimpleConstants,
>> >                             const DataLayout *DL) {
>> >   // If we already checked this constant, we win.
>> > -  if (!SimpleConstants.insert(C)) return true;
>> > +  if (!SimpleConstants.insert(C).second)
>> > +    return true;
>> >   // Check the constant.
>> >   return isSimpleEnoughValueToCommitHelper(C, SimpleConstants, DL);
>> > }
>> > @@ -2670,7 +2671,7 @@ bool Evaluator::EvaluateFunction(Functio
>> >     // Okay, we succeeded in evaluating this control flow.  See if we
>> have
>> >     // executed the new block before.  If so, we have a looping
>> function,
>> >     // which we cannot evaluate in reasonable time.
>> > -    if (!ExecutedBlocks.insert(NextBB))
>> > +    if (!ExecutedBlocks.insert(NextBB).second)
>> >       return false;  // looped!
>> >
>> >     // Okay, we have never been in this block before.  Check to see if
>> there
>> > @@ -2779,8 +2780,10 @@ public:
>> >   }
>> >   bool usedErase(GlobalValue *GV) { return Used.erase(GV); }
>> >   bool compilerUsedErase(GlobalValue *GV) { return
>> CompilerUsed.erase(GV); }
>> > -  bool usedInsert(GlobalValue *GV) { return Used.insert(GV); }
>> > -  bool compilerUsedInsert(GlobalValue *GV) { return
>> CompilerUsed.insert(GV); }
>> > +  bool usedInsert(GlobalValue *GV) { return Used.insert(GV).second; }
>> > +  bool compilerUsedInsert(GlobalValue *GV) {
>> > +    return CompilerUsed.insert(GV).second;
>> > +  }
>> >
>> >   void syncVariablesAndSets() {
>> >     if (UsedV)
>> > @@ -2973,7 +2976,7 @@ static bool cxxDtorIsEmpty(const Functio
>> >       SmallPtrSet<const Function *, 8>
>> NewCalledFunctions(CalledFunctions);
>> >
>> >       // Don't treat recursive functions as empty.
>> > -      if (!NewCalledFunctions.insert(CalledFn))
>> > +      if (!NewCalledFunctions.insert(CalledFn).second)
>> >         return false;
>> >
>> >       if (!cxxDtorIsEmpty(*CalledFn, NewCalledFunctions))
>> >
>> > Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Wed Nov 19 01:49:26 2014
>> > @@ -219,7 +219,7 @@ static bool InlineCallIfPossible(CallSit
>> >
>> >       // If the inlined function already uses this alloca then we can't
>> reuse
>> >       // it.
>> > -      if (!UsedAllocas.insert(AvailableAlloca))
>> > +      if (!UsedAllocas.insert(AvailableAlloca).second)
>> >         continue;
>> >
>> >       // Otherwise, we *can* reuse it, RAUW AI into AvailableAlloca and
>> declare
>> >
>> > Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1049,7 +1049,7 @@ int FunctionComparator::compare() {
>> >
>> >     assert(TermL->getNumSuccessors() == TermR->getNumSuccessors());
>> >     for (unsigned i = 0, e = TermL->getNumSuccessors(); i != e; ++i) {
>> > -      if (!VisitedBBs.insert(TermL->getSuccessor(i)))
>> > +      if (!VisitedBBs.insert(TermL->getSuccessor(i)).second)
>> >         continue;
>> >
>> >       FnLBBs.push_back(TermL->getSuccessor(i));
>> >
>> > Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -511,7 +511,7 @@ static bool DeadPHICycle(PHINode *PN,
>> >   if (!PN->hasOneUse()) return false;
>> >
>> >   // Remember this node, and if we find the cycle, return.
>> > -  if (!PotentiallyDeadPHIs.insert(PN))
>> > +  if (!PotentiallyDeadPHIs.insert(PN).second)
>> >     return true;
>> >
>> >   // Don't scan crazily complex things.
>> > @@ -530,7 +530,7 @@ static bool DeadPHICycle(PHINode *PN,
>> > static bool PHIsEqualValue(PHINode *PN, Value *NonPhiInVal,
>> >                            SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) {
>> >   // See if we already saw this PHI node.
>> > -  if (!ValueEqualPHIs.insert(PN))
>> > +  if (!ValueEqualPHIs.insert(PN).second)
>> >     return true;
>> >
>> >   // Don't scan crazily complex things.
>> > @@ -654,7 +654,7 @@ Instruction *InstCombiner::SliceUpIllega
>> >
>> >       // If the user is a PHI, inspect its uses recursively.
>> >       if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) {
>> > -        if (PHIsInspected.insert(UserPN))
>> > +        if (PHIsInspected.insert(UserPN).second)
>> >           PHIsToSlice.push_back(UserPN);
>> >         continue;
>> >       }
>> >
>> > Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>> (original)
>> > +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Wed
>> Nov 19 01:49:26 2014
>> > @@ -2341,7 +2341,7 @@ Instruction *InstCombiner::visitLandingP
>> >
>> >       // If we already saw this clause, there is no point in having a
>> second
>> >       // copy of it.
>> > -      if (AlreadyCaught.insert(TypeInfo)) {
>> > +      if (AlreadyCaught.insert(TypeInfo).second) {
>> >         // This catch clause was not already seen.
>> >         NewClauses.push_back(CatchClause);
>> >       } else {
>> > @@ -2423,7 +2423,7 @@ Instruction *InstCombiner::visitLandingP
>> >             continue;
>> >           // There is no point in having multiple copies of the same
>> typeinfo in
>> >           // a filter, so only add it if we didn't already.
>> > -          if (SeenInFilter.insert(TypeInfo))
>> > +          if (SeenInFilter.insert(TypeInfo).second)
>> >             NewFilterElts.push_back(cast<Constant>(Elt));
>> >         }
>> >         // A filter containing a catch-all cannot match anything by
>> definition.
>> > @@ -2675,7 +2675,8 @@ static bool AddReachableCodeToWorklist(B
>> >     BB = Worklist.pop_back_val();
>> >
>> >     // We have now visited this block!  If we've already been here,
>> ignore it.
>> > -    if (!Visited.insert(BB)) continue;
>> > +    if (!Visited.insert(BB).second)
>> > +      continue;
>> >
>> >     for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI !=
>> E; ) {
>> >       Instruction *Inst = BBI++;
>> >
>> > Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
>> (original)
>> > +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Wed
>> Nov 19 01:49:26 2014
>> > @@ -1317,7 +1317,7 @@ bool AddressSanitizer::runOnFunction(Fun
>> >       if (Value *Addr =
>> >               isInterestingMemoryAccess(&Inst, &IsWrite, &Alignment)) {
>> >         if (ClOpt && ClOptSameTemp) {
>> > -          if (!TempsToInstrument.insert(Addr))
>> > +          if (!TempsToInstrument.insert(Addr).second)
>> >             continue;  // We've seen this temp in the current BB.
>> >         }
>> >       } else if (ClInvalidPointerPairs &&
>> >
>> > Modified: llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -229,7 +229,7 @@ llvm::objcarc::FindDependencies(Dependen
>> >           // Add the predecessors to the worklist.
>> >           do {
>> >             BasicBlock *PredBB = *PI;
>> > -            if (Visited.insert(PredBB))
>> > +            if (Visited.insert(PredBB).second)
>> >               Worklist.push_back(std::make_pair(PredBB, PredBB->end()));
>> >           } while (++PI != PE);
>> >         break;
>> >
>> > Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -188,7 +188,7 @@ static inline bool AreAnyUnderlyingObjec
>> >     if (isa<AllocaInst>(P))
>> >       return true;
>> >
>> > -    if (!Visited.insert(P))
>> > +    if (!Visited.insert(P).second)
>> >       continue;
>> >
>> >     if (const SelectInst *SI = dyn_cast<const SelectInst>(P)) {
>> > @@ -412,7 +412,7 @@ bool RRInfo::Merge(const RRInfo &Other)
>> >     // that makes this a partial merge.
>> >     bool Partial = ReverseInsertPts.size() !=
>> Other.ReverseInsertPts.size();
>> >     for (Instruction *Inst : Other.ReverseInsertPts)
>> > -      Partial |= ReverseInsertPts.insert(Inst);
>> > +      Partial |= ReverseInsertPts.insert(Inst).second;
>> >     return Partial;
>> > }
>> >
>> > @@ -2194,7 +2194,7 @@ ComputePostOrders(Function &F,
>> >
>> >     while (SuccStack.back().second != SE) {
>> >       BasicBlock *SuccBB = *SuccStack.back().second++;
>> > -      if (Visited.insert(SuccBB)) {
>> > +      if (Visited.insert(SuccBB).second) {
>> >         TerminatorInst *TI = cast<TerminatorInst>(&SuccBB->back());
>> >         SuccStack.push_back(std::make_pair(SuccBB, succ_iterator(TI)));
>> >         BBStates[CurrBB].addSucc(SuccBB);
>> > @@ -2235,7 +2235,7 @@ ComputePostOrders(Function &F,
>> >       BBState::edge_iterator PE =
>> BBStates[PredStack.back().first].pred_end();
>> >       while (PredStack.back().second != PE) {
>> >         BasicBlock *BB = *PredStack.back().second++;
>> > -        if (Visited.insert(BB)) {
>> > +        if (Visited.insert(BB).second) {
>> >           PredStack.push_back(std::make_pair(BB,
>> BBStates[BB].pred_begin()));
>> >           goto reverse_dfs_next_succ;
>> >         }
>> > @@ -2390,7 +2390,7 @@ ObjCARCOpt::ConnectTDBUTraversals(DenseM
>> >         if (!NewRetainReleaseRRI.Calls.count(NewRetain))
>> >           return false;
>> >
>> > -        if (ReleasesToMove.Calls.insert(NewRetainRelease)) {
>> > +        if (ReleasesToMove.Calls.insert(NewRetainRelease).second) {
>> >
>> >           // If we overflow when we compute the path count, don't
>> remove/move
>> >           // anything.
>> > @@ -2422,7 +2422,7 @@ ObjCARCOpt::ConnectTDBUTraversals(DenseM
>> >           // Collect the optimal insertion points.
>> >           if (!KnownSafe)
>> >             for (Instruction *RIP :
>> NewRetainReleaseRRI.ReverseInsertPts) {
>> > -              if (ReleasesToMove.ReverseInsertPts.insert(RIP)) {
>> > +              if (ReleasesToMove.ReverseInsertPts.insert(RIP).second) {
>> >                 // If we overflow when we compute the path count, don't
>> >                 // remove/move anything.
>> >                 const BBState &RIPBBState = BBStates[RIP->getParent()];
>> > @@ -2467,7 +2467,7 @@ ObjCARCOpt::ConnectTDBUTraversals(DenseM
>> >         if (!NewReleaseRetainRRI.Calls.count(NewRelease))
>> >           return false;
>> >
>> > -        if (RetainsToMove.Calls.insert(NewReleaseRetain)) {
>> > +        if (RetainsToMove.Calls.insert(NewReleaseRetain).second) {
>> >           // If we overflow when we compute the path count, don't
>> remove/move
>> >           // anything.
>> >           const BBState &NRRBBState =
>> BBStates[NewReleaseRetain->getParent()];
>> > @@ -2483,7 +2483,7 @@ ObjCARCOpt::ConnectTDBUTraversals(DenseM
>> >           // Collect the optimal insertion points.
>> >           if (!KnownSafe)
>> >             for (Instruction *RIP :
>> NewReleaseRetainRRI.ReverseInsertPts) {
>> > -              if (RetainsToMove.ReverseInsertPts.insert(RIP)) {
>> > +              if (RetainsToMove.ReverseInsertPts.insert(RIP).second) {
>> >                 // If we overflow when we compute the path count, don't
>> >                 // remove/move anything.
>> >                 const BBState &RIPBBState = BBStates[RIP->getParent()];
>> >
>> > Modified: llvm/trunk/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -62,7 +62,7 @@ bool ProvenanceAnalysis::relatedPHI(cons
>> >   SmallPtrSet<const Value *, 4> UniqueSrc;
>> >   for (unsigned i = 0, e = A->getNumIncomingValues(); i != e; ++i) {
>> >     const Value *PV1 = A->getIncomingValue(i);
>> > -    if (UniqueSrc.insert(PV1) && related(PV1, B))
>> > +    if (UniqueSrc.insert(PV1).second && related(PV1, B))
>> >       return true;
>> >   }
>> >
>> > @@ -94,7 +94,7 @@ static bool IsStoredObjCPointer(const Va
>> >       if (isa<PtrToIntInst>(P))
>> >         // Assume the worst.
>> >         return true;
>> > -      if (Visited.insert(Ur))
>> > +      if (Visited.insert(Ur).second)
>> >         Worklist.push_back(Ur);
>> >     }
>> >   } while (!Worklist.empty());
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/ADCE.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ADCE.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/ADCE.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/ADCE.cpp Wed Nov 19 01:49:26 2014
>> > @@ -73,7 +73,7 @@ bool ADCE::runOnFunction(Function& F) {
>> >     for (Instruction::op_iterator OI = curr->op_begin(), OE =
>> curr->op_end();
>> >          OI != OE; ++OI)
>> >       if (Instruction* Inst = dyn_cast<Instruction>(OI))
>> > -        if (alive.insert(Inst))
>> > +        if (alive.insert(Inst).second)
>> >           worklist.push_back(Inst);
>> >   }
>> >
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1102,7 +1102,7 @@ void WidenIV::pushNarrowIVUsers(Instruct
>> >     Instruction *NarrowUser = cast<Instruction>(U);
>> >
>> >     // Handle data flow merges and bizarre phi cycles.
>> > -    if (!Widened.insert(NarrowUser))
>> > +    if (!Widened.insert(NarrowUser).second)
>> >       continue;
>> >
>> >     NarrowIVUsers.push_back(NarrowIVDefUse(NarrowDef, NarrowUser,
>> WideDef));
>> > @@ -1284,7 +1284,7 @@ void IndVarSimplify::SimplifyAndExtend(L
>> > static bool isHighCostExpansion(const SCEV *S, BranchInst *BI,
>> >                                 SmallPtrSetImpl<const SCEV*> &Processed,
>> >                                 ScalarEvolution *SE) {
>> > -  if (!Processed.insert(S))
>> > +  if (!Processed.insert(S).second)
>> >     return false;
>> >
>> >   // If the backedge-taken count is a UDiv, it's very likely a UDiv that
>> > @@ -1475,7 +1475,7 @@ static bool hasConcreteDefImpl(Value *V,
>> >
>> >   // Optimistically handle other instructions.
>> >   for (User::op_iterator OI = I->op_begin(), E = I->op_end(); OI != E;
>> ++OI) {
>> > -    if (!Visited.insert(*OI))
>> > +    if (!Visited.insert(*OI).second)
>> >       continue;
>> >     if (!hasConcreteDefImpl(*OI, Visited, Depth+1))
>> >       return false;
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -932,7 +932,7 @@ bool JumpThreading::SimplifyPartiallyRed
>> >     BasicBlock *PredBB = *PI;
>> >
>> >     // If we already scanned this predecessor, skip it.
>> > -    if (!PredsScanned.insert(PredBB))
>> > +    if (!PredsScanned.insert(PredBB).second)
>> >       continue;
>> >
>> >     // Scan the predecessor to see if the value is available in the
>> pred.
>> > @@ -1151,7 +1151,7 @@ bool JumpThreading::ProcessThreadableEdg
>> >
>> >   for (unsigned i = 0, e = PredValues.size(); i != e; ++i) {
>> >     BasicBlock *Pred = PredValues[i].second;
>> > -    if (!SeenPreds.insert(Pred))
>> > +    if (!SeenPreds.insert(Pred).second)
>> >       continue;  // Duplicate predecessor entry.
>> >
>> >     // If the predecessor ends with an indirect goto, we can't change
>> its
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -152,7 +152,7 @@ bool LoopInstSimplify::runOnLoop(Loop *L
>> >       for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI !=
>> SE;
>> >            ++SI) {
>> >         BasicBlock *SuccBB = *SI;
>> > -        if (!Visited.insert(SuccBB))
>> > +        if (!Visited.insert(SuccBB).second)
>> >           continue;
>> >
>> >         const Loop *SuccLoop = LI->getLoopFor(SuccBB);
>> > @@ -165,7 +165,7 @@ bool LoopInstSimplify::runOnLoop(Loop *L
>> >
>> >           for (unsigned i = 0; i < SubLoopExitBlocks.size(); ++i) {
>> >             BasicBlock *ExitBB = SubLoopExitBlocks[i];
>> > -            if (LI->getLoopFor(ExitBB) == L && Visited.insert(ExitBB))
>> > +            if (LI->getLoopFor(ExitBB) == L &&
>> Visited.insert(ExitBB).second)
>> >               VisitStack.push_back(WorklistItem(ExitBB, false));
>> >           }
>> >
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -762,7 +762,7 @@ static bool isHighCostExpansion(const SC
>> >                                Processed, SE);
>> >   }
>> >
>> > -  if (!Processed.insert(S))
>> > +  if (!Processed.insert(S).second)
>> >     return false;
>> >
>> >   if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
>> > @@ -975,7 +975,7 @@ void Cost::RatePrimaryRegister(const SCE
>> >     Lose();
>> >     return;
>> >   }
>> > -  if (Regs.insert(Reg)) {
>> > +  if (Regs.insert(Reg).second) {
>> >     RateRegister(Reg, Regs, L, SE, DT);
>> >     if (LoserRegs && isLoser())
>> >       LoserRegs->insert(Reg);
>> > @@ -2802,7 +2802,7 @@ void LSRInstance::CollectChains() {
>> >       User::op_iterator IVOpIter = findIVOperand(I->op_begin(),
>> IVOpEnd, L, SE);
>> >       while (IVOpIter != IVOpEnd) {
>> >         Instruction *IVOpInst = cast<Instruction>(*IVOpIter);
>> > -        if (UniqueOperands.insert(IVOpInst))
>> > +        if (UniqueOperands.insert(IVOpInst).second)
>> >           ChainInstruction(I, IVOpInst, ChainUsersVec);
>> >         IVOpIter = findIVOperand(std::next(IVOpIter), IVOpEnd, L, SE);
>> >       }
>> > @@ -3122,7 +3122,7 @@ LSRInstance::CollectLoopInvariantFixupsA
>> >     const SCEV *S = Worklist.pop_back_val();
>> >
>> >     // Don't process the same SCEV twice
>> > -    if (!Visited.insert(S))
>> > +    if (!Visited.insert(S).second)
>> >       continue;
>> >
>> >     if (const SCEVNAryExpr *N = dyn_cast<SCEVNAryExpr>(S))
>> > @@ -3774,7 +3774,7 @@ void LSRInstance::GenerateCrossUseConsta
>> >         for (int LUIdx = UsedByIndices.find_first(); LUIdx != -1;
>> >              LUIdx = UsedByIndices.find_next(LUIdx))
>> >           // Make a memo of this use, offset, and register tuple.
>> > -          if (UniqueItems.insert(std::make_pair(LUIdx, Imm)))
>> > +          if (UniqueItems.insert(std::make_pair(LUIdx, Imm)).second)
>> >             WorkItems.push_back(WorkItem(LUIdx, Imm, OrigReg));
>> >       }
>> >     }
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -623,7 +623,7 @@ static bool LinearizeExprTree(BinaryOper
>> >       // If this is a binary operation of the right kind with only one
>> use then
>> >       // add its operands to the expression.
>> >       if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) {
>> > -        assert(Visited.insert(Op) && "Not first visit!");
>> > +        assert(Visited.insert(Op).second && "Not first visit!");
>> >         DEBUG(dbgs() << "DIRECT ADD: " << *Op << " (" << Weight <<
>> ")\n");
>> >         Worklist.push_back(std::make_pair(BO, Weight));
>> >         continue;
>> > @@ -633,7 +633,7 @@ static bool LinearizeExprTree(BinaryOper
>> >       LeafMap::iterator It = Leaves.find(Op);
>> >       if (It == Leaves.end()) {
>> >         // Not in the leaf map.  Must be the first time we saw this
>> operand.
>> > -        assert(Visited.insert(Op) && "Not first visit!");
>> > +        assert(Visited.insert(Op).second && "Not first visit!");
>> >         if (!Op->hasOneUse()) {
>> >           // This value has uses not accounted for by the expression,
>> so it is
>> >           // not safe to modify.  Mark it as being a leaf.
>> > @@ -1609,7 +1609,7 @@ Value *Reassociate::OptimizeAdd(Instruct
>> >     SmallPtrSet<Value*, 8> Duplicates;
>> >     for (unsigned i = 0, e = Factors.size(); i != e; ++i) {
>> >       Value *Factor = Factors[i];
>> > -      if (!Duplicates.insert(Factor))
>> > +      if (!Duplicates.insert(Factor).second)
>> >         continue;
>> >
>> >       unsigned Occ = ++FactorOccurrences[Factor];
>> > @@ -1960,7 +1960,7 @@ void Reassociate::EraseInst(Instruction
>> >       // and add that since that's where optimization actually happens.
>> >       unsigned Opcode = Op->getOpcode();
>> >       while (Op->hasOneUse() && Op->user_back()->getOpcode() == Opcode
>> &&
>> > -             Visited.insert(Op))
>> > +             Visited.insert(Op).second)
>> >         Op = Op->user_back();
>> >       RedoInsts.insert(Op);
>> >     }
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Wed Nov 19 01:49:26 2014
>> > @@ -214,7 +214,8 @@ public:
>> >   ///
>> >   /// This returns true if the block was not considered live before.
>> >   bool MarkBlockExecutable(BasicBlock *BB) {
>> > -    if (!BBExecutable.insert(BB)) return false;
>> > +    if (!BBExecutable.insert(BB).second)
>> > +      return false;
>> >     DEBUG(dbgs() << "Marking Block Executable: " << BB->getName() <<
>> '\n');
>> >     BBWorkList.push_back(BB);  // Add the block to the work list!
>> >     return true;
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Wed Nov 19 01:49:26 2014
>> > @@ -349,7 +349,7 @@ public:
>> >
>> > private:
>> >   void markAsDead(Instruction &I) {
>> > -    if (VisitedDeadInsts.insert(&I))
>> > +    if (VisitedDeadInsts.insert(&I).second)
>> >       AS.DeadUsers.push_back(&I);
>> >   }
>> >
>> > @@ -639,7 +639,7 @@ private:
>> >       }
>> >
>> >       for (User *U : I->users())
>> > -        if (Visited.insert(cast<Instruction>(U)))
>> > +        if (Visited.insert(cast<Instruction>(U)).second)
>> >           Uses.push_back(std::make_pair(I, cast<Instruction>(U)));
>> >     } while (!Uses.empty());
>> >
>> > @@ -848,7 +848,7 @@ public:
>> >       else
>> >         return false;
>> >
>> > -    } while (Visited.insert(Ptr));
>> > +    } while (Visited.insert(Ptr).second);
>> >
>> >     return false;
>> >   }
>> > @@ -1461,7 +1461,7 @@ static Value *getAdjustedPtr(IRBuilderTy
>> >         break;
>> >       Offset += GEPOffset;
>> >       Ptr = GEP->getPointerOperand();
>> > -      if (!Visited.insert(Ptr))
>> > +      if (!Visited.insert(Ptr).second)
>> >         break;
>> >     }
>> >
>> > @@ -1498,7 +1498,7 @@ static Value *getAdjustedPtr(IRBuilderTy
>> >       break;
>> >     }
>> >     assert(Ptr->getType()->isPointerTy() && "Unexpected operand type!");
>> > -  } while (Visited.insert(Ptr));
>> > +  } while (Visited.insert(Ptr).second);
>> >
>> >   if (!OffsetPtr) {
>> >     if (!Int8Ptr) {
>> > @@ -2861,7 +2861,7 @@ private:
>> >   /// This uses a set to de-duplicate users.
>> >   void enqueueUsers(Instruction &I) {
>> >     for (Use &U : I.uses())
>> > -      if (Visited.insert(U.getUser()))
>> > +      if (Visited.insert(U.getUser()).second)
>> >         Queue.push_back(&U);
>> >   }
>> >
>> > @@ -3588,7 +3588,7 @@ static void enqueueUsersInWorklist(Instr
>> >                                    SmallVectorImpl<Instruction *>
>> &Worklist,
>> >                                    SmallPtrSetImpl<Instruction *>
>> &Visited) {
>> >   for (User *U : I.users())
>> > -    if (Visited.insert(cast<Instruction>(U)))
>> > +    if (Visited.insert(cast<Instruction>(U)).second)
>> >       Worklist.push_back(cast<Instruction>(U));
>> > }
>> >
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -305,7 +305,7 @@ void SampleProfileLoader::findEquivalenc
>> >   for (auto *BB2 : Descendants) {
>> >     bool IsDomParent = DomTree->dominates(BB2, BB1);
>> >     bool IsInSameLoop = LI->getLoopFor(BB1) == LI->getLoopFor(BB2);
>> > -    if (BB1 != BB2 && VisitedBlocks.insert(BB2) && IsDomParent &&
>> > +    if (BB1 != BB2 && VisitedBlocks.insert(BB2).second && IsDomParent
>> &&
>> >         IsInSameLoop) {
>> >       EquivalenceClass[BB2] = BB1;
>> >
>> > @@ -494,7 +494,7 @@ bool SampleProfileLoader::propagateThrou
>> >                          << " known. Set weight for block: ";
>> >                   printBlockWeight(dbgs(), BB););
>> >           }
>> > -          if (VisitedBlocks.insert(BB))
>> > +          if (VisitedBlocks.insert(BB).second)
>> >             Changed = true;
>> >         } else if (NumUnknownEdges == 1 && VisitedBlocks.count(BB)) {
>> >           // If there is a single unknown edge and the block has been
>> > @@ -540,7 +540,7 @@ void SampleProfileLoader::buildEdges(Fun
>> >       llvm_unreachable("Found a stale predecessors list in a basic
>> block.");
>> >     for (pred_iterator PI = pred_begin(B1), PE = pred_end(B1); PI !=
>> PE; ++PI) {
>> >       BasicBlock *B2 = *PI;
>> > -      if (Visited.insert(B2))
>> > +      if (Visited.insert(B2).second)
>> >         Predecessors[B1].push_back(B2);
>> >     }
>> >
>> > @@ -550,7 +550,7 @@ void SampleProfileLoader::buildEdges(Fun
>> >       llvm_unreachable("Found a stale successors list in a basic
>> block.");
>> >     for (succ_iterator SI = succ_begin(B1), SE = succ_end(B1); SI !=
>> SE; ++SI) {
>> >       BasicBlock *B2 = *SI;
>> > -      if (Visited.insert(B2))
>> > +      if (Visited.insert(B2).second)
>> >         Successors[B1].push_back(B2);
>> >     }
>> >   }
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Wed Nov
>> 19 01:49:26 2014
>> > @@ -1669,7 +1669,7 @@ void SROA::isSafePHISelectUseForScalarRe
>> >                                            AllocaInfo &Info) {
>> >   // If we've already checked this PHI, don't do it again.
>> >   if (PHINode *PN = dyn_cast<PHINode>(I))
>> > -    if (!Info.CheckedPHIs.insert(PN))
>> > +    if (!Info.CheckedPHIs.insert(PN).second)
>> >       return;
>> >
>> >   for (User *U : I->users()) {
>> >
>> > Modified: llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp
>> (original)
>> > +++ llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp Wed
>> Nov 19 01:49:26 2014
>> > @@ -179,7 +179,7 @@ struct AllocaDerivedValueTracker {
>> >
>> >     auto AddUsesToWorklist = [&](Value *V) {
>> >       for (auto &U : V->uses()) {
>> > -        if (!Visited.insert(&U))
>> > +        if (!Visited.insert(&U).second)
>> >           continue;
>> >         Worklist.push_back(&U);
>> >       }
>> >
>> > Modified: llvm/trunk/lib/Transforms/Utils/GlobalStatus.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/GlobalStatus.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Utils/GlobalStatus.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Utils/GlobalStatus.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -133,7 +133,7 @@ static bool analyzeGlobalAux(const Value
>> >       } else if (const PHINode *PN = dyn_cast<PHINode>(I)) {
>> >         // PHI nodes we can check just like select or GEP instructions,
>> but we
>> >         // have to be careful about infinite recursion.
>> > -        if (PhiUsers.insert(PN)) // Not already visited.
>> > +        if (PhiUsers.insert(PN).second) // Not already visited.
>> >           if (analyzeGlobalAux(I, GS, PhiUsers))
>> >             return true;
>> >       } else if (isa<CmpInst>(I)) {
>> >
>> > Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Utils/Local.cpp Wed Nov 19 01:49:26 2014
>> > @@ -392,7 +392,7 @@ bool llvm::RecursivelyDeleteDeadPHINode(
>> >
>> >     // If we find an instruction more than once, we're on a cycle that
>> >     // won't prove fruitful.
>> > -    if (!Visited.insert(I)) {
>> > +    if (!Visited.insert(I).second) {
>> >       // Break the cycle and delete the instruction and its operands.
>> >       I->replaceAllUsesWith(UndefValue::get(I->getType()));
>> >       (void)RecursivelyDeleteTriviallyDeadInstructions(I, TLI);
>> > @@ -1266,7 +1266,7 @@ static bool markAliveBlocks(BasicBlock *
>> >
>> >     Changed |= ConstantFoldTerminator(BB, true);
>> >     for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI !=
>> SE; ++SI)
>> > -      if (Reachable.insert(*SI))
>> > +      if (Reachable.insert(*SI).second)
>> >         Worklist.push_back(*SI);
>> >   } while (!Worklist.empty());
>> >   return Changed;
>> >
>> > Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -112,7 +112,7 @@ FoldBlockIntoPredecessor(BasicBlock *BB,
>> >   if (LPM) {
>> >     if (ScalarEvolution *SE =
>> LPM->getAnalysisIfAvailable<ScalarEvolution>()) {
>> >       if (Loop *L = LI->getLoopFor(BB)) {
>> > -        if (ForgottenLoops.insert(L))
>> > +        if (ForgottenLoops.insert(L).second)
>> >           SE->forgetLoop(L);
>> >       }
>> >     }
>> >
>> > Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
>> (original)
>> > +++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Wed Nov
>> 19 01:49:26 2014
>> > @@ -819,7 +819,7 @@ void PromoteMem2Reg::ComputeLiveInBlocks
>> >
>> >     // The block really is live in here, insert it into the set.  If
>> already in
>> >     // the set, then it has already been processed.
>> > -    if (!LiveInBlocks.insert(BB))
>> > +    if (!LiveInBlocks.insert(BB).second)
>> >       continue;
>> >
>> >     // Since the value is live into BB, it is either defined in a
>> predecessor or
>> > @@ -899,7 +899,7 @@ void PromoteMem2Reg::DetermineInsertionP
>> >         if (SuccLevel > RootLevel)
>> >           continue;
>> >
>> > -        if (!Visited.insert(SuccNode))
>> > +        if (!Visited.insert(SuccNode).second)
>> >           continue;
>> >
>> >         BasicBlock *SuccBB = SuccNode->getBlock();
>> > @@ -1004,7 +1004,7 @@ NextIteration:
>> >   }
>> >
>> >   // Don't revisit blocks.
>> > -  if (!Visited.insert(BB))
>> > +  if (!Visited.insert(BB).second)
>> >     return;
>> >
>> >   for (BasicBlock::iterator II = BB->begin();
>> !isa<TerminatorInst>(II);) {
>> > @@ -1061,7 +1061,7 @@ NextIteration:
>> >   ++I;
>> >
>> >   for (; I != E; ++I)
>> > -    if (VisitedSuccs.insert(*I))
>> > +    if (VisitedSuccs.insert(*I).second)
>> >       Worklist.push_back(RenamePassData(*I, Pred, IncomingVals));
>> >
>> >   goto NextIteration;
>> >
>> > Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -4202,7 +4202,7 @@ bool SimplifyCFGOpt::SimplifyIndirectBr(
>> >   SmallPtrSet<Value *, 8> Succs;
>> >   for (unsigned i = 0, e = IBI->getNumDestinations(); i != e; ++i) {
>> >     BasicBlock *Dest = IBI->getDestination(i);
>> > -    if (!Dest->hasAddressTaken() || !Succs.insert(Dest)) {
>> > +    if (!Dest->hasAddressTaken() || !Succs.insert(Dest).second) {
>> >       Dest->removePredecessor(BB);
>> >       IBI->removeDestination(i);
>> >       --i; --e;
>> >
>> > Modified: llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -347,7 +347,7 @@ static void pushIVUsers(
>> >     // Also ensure unique worklist users.
>> >     // If Def is a LoopPhi, it may not be in the Simplified set, so
>> check for
>> >     // self edges first.
>> > -    if (UI != Def && Simplified.insert(UI))
>> > +    if (UI != Def && Simplified.insert(UI).second)
>> >       SimpleIVUsers.push_back(std::make_pair(UI, Def));
>> >   }
>> > }
>> >
>> > Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -4801,7 +4801,7 @@ bool LoopVectorizationLegality::canVecto
>> >
>> >     // If we did *not* see this pointer before, insert it to  the
>> read-write
>> >     // list. At this phase it is only a 'write' list.
>> > -    if (Seen.insert(Ptr)) {
>> > +    if (Seen.insert(Ptr).second) {
>> >       ++NumReadWrites;
>> >
>> >       AliasAnalysis::Location Loc = AA->getLocation(ST);
>> > @@ -4834,7 +4834,8 @@ bool LoopVectorizationLegality::canVecto
>> >     // read a few words, modify, and write a few words, and some of the
>> >     // words may be written to the same address.
>> >     bool IsReadOnlyPtr = false;
>> > -    if (Seen.insert(Ptr) || !isStridedPtr(SE, DL, Ptr, TheLoop,
>> Strides)) {
>> > +    if (Seen.insert(Ptr).second ||
>> > +        !isStridedPtr(SE, DL, Ptr, TheLoop, Strides)) {
>> >       ++NumReads;
>> >       IsReadOnlyPtr = true;
>> >     }
>> > @@ -5097,7 +5098,7 @@ bool LoopVectorizationLegality::AddReduc
>> >       // value must only be used once, except by phi nodes and min/max
>> >       // reductions which are represented as a cmp followed by a select.
>> >       ReductionInstDesc IgnoredVal(false, nullptr);
>> > -      if (VisitedInsts.insert(UI)) {
>> > +      if (VisitedInsts.insert(UI).second) {
>> >         if (isa<PHINode>(UI))
>> >           PHIs.push_back(UI);
>> >         else
>> >
>> > Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
>> > +++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Wed Nov 19
>> 01:49:26 2014
>> > @@ -1724,7 +1724,7 @@ int BoUpSLP::getTreeCost() {
>> >   for (UserList::iterator I = ExternalUses.begin(), E =
>> ExternalUses.end();
>> >        I != E; ++I) {
>> >     // We only add extract cost once for the same scalar.
>> > -    if (!ExtractCostCalculated.insert(I->Scalar))
>> > +    if (!ExtractCostCalculated.insert(I->Scalar).second)
>> >       continue;
>> >
>> >     // Uses by ephemeral values are free (because the ephemeral value
>> will be
>> > @@ -1922,7 +1922,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry
>> >         ValueList Operands;
>> >         BasicBlock *IBB = PH->getIncomingBlock(i);
>> >
>> > -        if (!VisitedBBs.insert(IBB)) {
>> > +        if (!VisitedBBs.insert(IBB).second) {
>> >           NewPhi->addIncoming(NewPhi->getIncomingValueForBlock(IBB),
>> IBB);
>> >           continue;
>> >         }
>> > @@ -3632,7 +3632,7 @@ bool SLPVectorizer::vectorizeChainsInBlo
>> >
>> >   for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e;
>> it++) {
>> >     // We may go through BB multiple times so skip the one we have
>> checked.
>> > -    if (!VisitedInstrs.insert(it))
>> > +    if (!VisitedInstrs.insert(it).second)
>> >       continue;
>> >
>> >     if (isa<DbgInfoIntrinsic>(it))
>> >
>> > Modified: llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenSchedule.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp (original)
>> > +++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -182,7 +182,7 @@ void CodeGenSchedModels::addProcModel(Re
>> > // Recursively find all reachable SchedReadWrite records.
>> > static void scanSchedRW(Record *RWDef, RecVec &RWDefs,
>> >                         SmallPtrSet<Record*, 16> &RWSet) {
>> > -  if (!RWSet.insert(RWDef))
>> > +  if (!RWSet.insert(RWDef).second)
>> >     return;
>> >   RWDefs.push_back(RWDef);
>> >   // Reads don't current have sequence records, but it can be added
>> later.
>> > @@ -751,7 +751,7 @@ void CodeGenSchedModels::createInstRWCla
>> >     for (ArrayRef<Record*>::const_iterator
>> >            II = InstDefs.begin(), IE = InstDefs.end(); II != IE; ++II) {
>> >       unsigned OldSCIdx = InstrClassMap[*II];
>> > -      if (OldSCIdx && RemappedClassIDs.insert(OldSCIdx)) {
>> > +      if (OldSCIdx && RemappedClassIDs.insert(OldSCIdx).second) {
>> >         for (RecIter RI = SchedClasses[OldSCIdx].InstRWs.begin(),
>> >                RE = SchedClasses[OldSCIdx].InstRWs.end(); RI != RE;
>> ++RI) {
>> >           if ((*RI)->getValueAsDef("SchedModel") == RWModelDef) {
>> >
>> > Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=222334&r1=222333&r2=222334&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
>> > +++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Wed Nov 19 01:49:26
>> 2014
>> > @@ -386,7 +386,7 @@ EmitStageAndOperandCycleData(raw_ostream
>> >   for (CodeGenSchedModels::ProcIter PI = SchedModels.procModelBegin(),
>> >          PE = SchedModels.procModelEnd(); PI != PE; ++PI) {
>> >
>> > -    if (!ItinsDefSet.insert(PI->ItinsDef))
>> > +    if (!ItinsDefSet.insert(PI->ItinsDef).second)
>> >       continue;
>> >
>> >     std::vector<Record*> FUs = PI->ItinsDef->getValueAsListOfDefs("FU");
>> > @@ -565,7 +565,7 @@ EmitItineraries(raw_ostream &OS,
>> >          PE = SchedModels.procModelEnd(); PI != PE; ++PI,
>> ++ProcItinListsIter) {
>> >
>> >     Record *ItinsDef = PI->ItinsDef;
>> > -    if (!ItinsDefSet.insert(ItinsDef))
>> > +    if (!ItinsDefSet.insert(ItinsDef).second)
>> >       continue;
>> >
>> >     // Get processor itinerary name
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141119/7025fa33/attachment.html>


More information about the llvm-commits mailing list