From 1d3dd991caa2fb7da7081885065ed0d401f7aa8c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 4 Feb 2007 01:35:11 +0000 Subject: [PATCH] Switch VAlueMap from std::map to DenseMap. llvm-svn: 33863 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f0bd1420b20..d5402499ed2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -171,7 +171,7 @@ namespace llvm { /// ValueMap - Since we emit code for the function a basic block at a time, /// we must remember which virtual registers hold the values for /// cross-basic-block values. - std::map ValueMap; + DenseMap ValueMap; /// StaticAllocaMap - Keep track of frame indices for fixed sized allocas in /// the entry block. This allows the allocas to be efficiently referenced @@ -658,7 +658,7 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) { return DAG.getFrameIndex(SI->second, TLI.getPointerTy()); } - std::map::const_iterator VMI = + DenseMap::iterator VMI = FuncInfo.ValueMap.find(V); assert(VMI != FuncInfo.ValueMap.end() && "Value not in map!"); @@ -4026,7 +4026,7 @@ void SelectionDAGISel::BuildSelectionDAG(SelectionDAG &DAG, BasicBlock *LLVMBB, // blocks are available as virtual registers. for (BasicBlock::iterator I = LLVMBB->begin(), E = LLVMBB->end(); I != E;++I) if (!I->use_empty() && !isa(I)) { - std::map::iterator VMI =FuncInfo.ValueMap.find(I); + DenseMap::iterator VMI =FuncInfo.ValueMap.find(I); if (VMI != FuncInfo.ValueMap.end()) UnorderedChains.push_back( SDL.CopyValueToVirtualRegister(I, VMI->second));