From: Owen Anderson Date: Wed, 2 Jul 2008 17:32:04 +0000 (+0000) Subject: Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSet X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2c04b0da2b23e812cb1c15bb2bd6aac33b34364d;p=oota-llvm.git Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSet with a huge "size" parameter is actually quite inefficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53034 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 960ce8f5e91..b9b828dde09 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -21,7 +21,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/InstIterator.h" #include "llvm/ADT/Statistic.h" -#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" using namespace llvm; @@ -33,7 +33,7 @@ namespace { static char ID; // Pass identification, replacement for typeid ADCE() : FunctionPass((intptr_t)&ID) {} - SmallPtrSet alive; + DenseSet alive; SmallVector worklist; virtual bool runOnFunction(Function& F);