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