From 59a28377152789a5144588cc20e9db30759aa46d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 4 Aug 2007 19:52:20 +0000 Subject: [PATCH] std::map -> DenseMap git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40816 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 7520b22749d..ad09e680228 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -702,7 +702,7 @@ bool PromoteMem2Reg::PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI) { /// alloca which is locally used in it (which might be a lot). void PromoteMem2Reg:: PromoteLocallyUsedAllocas(BasicBlock *BB, const std::vector &AIs) { - std::map CurValues; + DenseMap CurValues; for (unsigned i = 0, e = AIs.size(); i != e; ++i) CurValues[AIs[i]] = 0; // Insert with null value @@ -711,7 +711,7 @@ PromoteLocallyUsedAllocas(BasicBlock *BB, const std::vector &AIs) { if (LoadInst *LI = dyn_cast(Inst)) { // Is this a load of an alloca we are tracking? if (AllocaInst *AI = dyn_cast(LI->getOperand(0))) { - std::map::iterator AIt = CurValues.find(AI); + DenseMap::iterator AIt = CurValues.find(AI); if (AIt != CurValues.end()) { // If loading an uninitialized value, allow the inter-block case to // handle it. Due to control flow, this might actually be ok. @@ -730,7 +730,7 @@ PromoteLocallyUsedAllocas(BasicBlock *BB, const std::vector &AIs) { } } else if (StoreInst *SI = dyn_cast(Inst)) { if (AllocaInst *AI = dyn_cast(SI->getOperand(1))) { - std::map::iterator AIt = CurValues.find(AI); + DenseMap::iterator AIt = CurValues.find(AI); if (AIt != CurValues.end()) { // Store updates the "current value"... AIt->second = SI->getOperand(0);