From 59f5319719dd66570dc48d8415936a06c67672ff Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Tue, 18 Jan 2011 04:50:38 +0000 Subject: [PATCH] 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 --- 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 188693596cb..790d4c28817 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 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; -- 2.34.1