Use a SmallPtrSet as suggested by Chris.
authorDavid Greene <greened@obbligato.org>
Wed, 24 Feb 2010 20:59:49 +0000 (20:59 +0000)
committerDavid Greene <greened@obbligato.org>
Wed, 24 Feb 2010 20:59:49 +0000 (20:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97056 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 41050211b2e687cdbff88e42327286de2d613d14..2108717c5b62aa9e9a5620bc913c7284ed863e8f 100644 (file)
@@ -6344,8 +6344,8 @@ bool ShuffleVectorSDNode::isSplatMask(const int *Mask, EVT VT) {
 }
 
 static void checkForCyclesHelper(const SDNode *N,
-                                 std::set<const SDNode *> &visited,
-                                 std::set<const SDNode *> &checked) {
+                                 SmallPtrSet<const SDNode *, 32> &visited,
+                                 SmallPtrSet<const SDNode *, 32> &checked) {
   if (checked.find(N) != checked.end())
     return;
 
@@ -6371,8 +6371,8 @@ static void checkForCyclesHelper(const SDNode *N,
 void llvm::checkForCycles(const llvm::SDNode *N) {
 #ifdef XDEBUG
   assert(N && "Checking nonexistant SDNode");
-  std::set<const SDNode *> visited;
-  std::set<const SDNode *> checked;
+  SmallPtrSet<const SDNode *, 32> visited;
+  SmallPtrSet<const SDNode *, 32> checked;
   checkForCyclesHelper(N, visited, checked);
 #endif
 }