Use a SmallPtrSet as suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97056 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 4105021..2108717 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -6344,8 +6344,8 @@
 }
 
 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 @@
 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
 }