Convert a std::map to a DenseMap for another 1.7% speedup on -scalarrepl.

llvm-svn: 123732
This commit is contained in:
Cameron Zwarich 2011-01-18 04:50:38 +00:00
parent 6968c41ac8
commit fc210c79b7
1 changed files with 3 additions and 3 deletions

View File

@ -198,7 +198,7 @@ namespace {
/// AllocaLookup - Reverse mapping of Allocas.
///
std::map<AllocaInst*, unsigned> AllocaLookup;
DenseMap<AllocaInst*, unsigned> AllocaLookup;
/// NewPhiNodes - The PhiNodes we're adding.
///
@ -1052,7 +1052,7 @@ NextIteration:
AllocaInst *Src = dyn_cast<AllocaInst>(LI->getPointerOperand());
if (!Src) continue;
std::map<AllocaInst*, unsigned>::iterator AI = AllocaLookup.find(Src);
DenseMap<AllocaInst*, unsigned>::iterator AI = AllocaLookup.find(Src);
if (AI == AllocaLookup.end()) continue;
Value *V = IncomingVals[AI->second];
@ -1068,7 +1068,7 @@ NextIteration:
AllocaInst *Dest = dyn_cast<AllocaInst>(SI->getPointerOperand());
if (!Dest) continue;
std::map<AllocaInst *, unsigned>::iterator ai = AllocaLookup.find(Dest);
DenseMap<AllocaInst *, unsigned>::iterator ai = AllocaLookup.find(Dest);
if (ai == AllocaLookup.end())
continue;