summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-01-18 04:50:38 +0000
committerCameron Zwarich <zwarich@apple.com>2011-01-18 04:50:38 +0000
commit59f5319719dd66570dc48d8415936a06c67672ff (patch)
treef4f7b59fa8065f146c472d370a7e76e7d1a2a3c4 /lib
parent443997de8b0eb538aac833390358f30c952f85fc (diff)
downloadllvm-59f5319719dd66570dc48d8415936a06c67672ff.tar.gz
llvm-59f5319719dd66570dc48d8415936a06c67672ff.tar.bz2
llvm-59f5319719dd66570dc48d8415936a06c67672ff.tar.xz
Convert a std::map to a DenseMap for another 1.7% speedup on -scalarrepl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123732 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index 188693596c..790d4c2881 100644
--- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -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;