From fc210c79b7cc603a2912aaa9115e63dcfc9ef8a6 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Tue, 18 Jan 2011 04:50:38 +0000 Subject: Convert a std::map to a DenseMap for another 1.7% speedup on -scalarrepl. llvm-svn: 123732 --- llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Utils') diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 188693596cb..790d4c28817 100644 --- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -198,7 +198,7 @@ namespace { /// AllocaLookup - Reverse mapping of Allocas. /// - std::map AllocaLookup; + DenseMap AllocaLookup; /// NewPhiNodes - The PhiNodes we're adding. /// @@ -1052,7 +1052,7 @@ NextIteration: AllocaInst *Src = dyn_cast(LI->getPointerOperand()); if (!Src) continue; - std::map::iterator AI = AllocaLookup.find(Src); + DenseMap::iterator AI = AllocaLookup.find(Src); if (AI == AllocaLookup.end()) continue; Value *V = IncomingVals[AI->second]; @@ -1068,7 +1068,7 @@ NextIteration: AllocaInst *Dest = dyn_cast(SI->getPointerOperand()); if (!Dest) continue; - std::map::iterator ai = AllocaLookup.find(Dest); + DenseMap::iterator ai = AllocaLookup.find(Dest); if (ai == AllocaLookup.end()) continue; -- cgit v1.2.3