Use a SmallPtrSet as suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Greene
2010-02-24 20:59:49 +00:00
parent 173c5c40f6
commit 2f9b685198

View File

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