[llvm] r245739 - [LVI] Use a SmallVector instead of SmallPtrSet. NFC

Bruno Cardoso Lopes via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 14:18:26 PDT 2015


Author: bruno
Date: Fri Aug 21 16:18:26 2015
New Revision: 245739

URL: http://llvm.org/viewvc/llvm-project?rev=245739&view=rev
Log:
[LVI] Use a SmallVector instead of SmallPtrSet. NFC

Modified:
    llvm/trunk/lib/Analysis/LazyValueInfo.cpp

Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=245739&r1=245738&r2=245739&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Fri Aug 21 16:18:26 2015
@@ -1055,7 +1055,7 @@ void LazyValueInfoCache::threadEdge(Basi
   auto I = OverDefinedCache.find(OldSucc);
   if (I == OverDefinedCache.end())
     return; // Nothing to process here.
-  SmallPtrSet<Value *, 4> ClearSet(I->second.begin(), I->second.end());
+  SmallVector<Value *, 4> ValsToClear(I->second.begin(), I->second.end());
 
   // Use a worklist to perform a depth-first search of OldSucc's successors.
   // NOTE: We do not need a visited list since any blocks we have already
@@ -1069,7 +1069,7 @@ void LazyValueInfoCache::threadEdge(Basi
     if (ToUpdate == NewSucc) continue;
 
     bool changed = false;
-    for (Value *V : ClearSet) {
+    for (Value *V : ValsToClear) {
       // If a value was marked overdefined in OldSucc, and is here too...
       auto OI = OverDefinedCache.find(ToUpdate);
       if (OI == OverDefinedCache.end())




More information about the llvm-commits mailing list