Change an std::set to a SmallPtrSet. This speeds up the verifier on
authorChris Lattner <sabre@nondot.org>
Sat, 10 Feb 2007 08:19:44 +0000 (08:19 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 10 Feb 2007 08:19:44 +0000 (08:19 +0000)
447.dealII from 1.27s to 0.86s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34143 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Verifier.cpp

index c2fd8746b7abac5b6828d1d45f3148b0c9433a3f..3d80c6c2db600a9ba416cab9dbb5f1d224c5b144 100644 (file)
@@ -56,6 +56,7 @@
 #include "llvm/Support/CFG.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/Streams.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
@@ -80,7 +81,7 @@ namespace {  // Anonymous namespace for class
     /// instructions we have seen so far.  This allows us to do efficient
     /// dominance checks for the case when an instruction has an operand that is
     /// an instruction in the same block.
-    std::set<Instruction*> InstsInThisBlock;
+    SmallPtrSet<Instruction*, 16> InstsInThisBlock;
 
     Verifier()
         : Broken(false), RealPass(true), action(AbortProcessAction),