Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSet

with a huge "size" parameter is actually quite inefficient.

llvm-svn: 53034
This commit is contained in:
Owen Anderson 2008-07-02 17:32:04 +00:00
parent 286d0c40c3
commit 9edcf24da9
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
#include "llvm/Support/Compiler.h" #include "llvm/Support/Compiler.h"
#include "llvm/Support/InstIterator.h" #include "llvm/Support/InstIterator.h"
#include "llvm/ADT/Statistic.h" #include "llvm/ADT/Statistic.h"
#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallVector.h"
using namespace llvm; using namespace llvm;
@ -33,7 +33,7 @@ namespace {
static char ID; // Pass identification, replacement for typeid static char ID; // Pass identification, replacement for typeid
ADCE() : FunctionPass((intptr_t)&ID) {} ADCE() : FunctionPass((intptr_t)&ID) {}
SmallPtrSet<Instruction*, 1024> alive; DenseSet<Instruction*> alive;
SmallVector<Instruction*, 1024> worklist; SmallVector<Instruction*, 1024> worklist;
virtual bool runOnFunction(Function& F); virtual bool runOnFunction(Function& F);