Make MBBMap a DenseMap instead of a std::map.
authorDan Gohman <gohman@apple.com>
Sat, 23 Aug 2008 02:44:46 +0000 (02:44 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 23 Aug 2008 02:44:46 +0000 (02:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55220 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/FastISel.h
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 43551134357011b4ca35fe33a195679ade3644dc..636081f6b9a9081f12e81787a3a9c3d3d58f3075 100644 (file)
@@ -17,7 +17,6 @@
 #include "llvm/BasicBlock.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/CodeGen/SelectionDAGNodes.h"
-#include <map>
 
 namespace llvm {
 
@@ -53,7 +52,7 @@ public:
   BasicBlock::iterator
   SelectInstructions(BasicBlock::iterator Begin, BasicBlock::iterator End,
                      DenseMap<const Value*, unsigned> &ValueMap,
-                     std::map<const BasicBlock*, MachineBasicBlock *> &MBBMap,
+                     DenseMap<const BasicBlock*, MachineBasicBlock *> &MBBMap,
                      MachineBasicBlock *MBB);
 
   virtual ~FastISel();
index fb4de574a85f7db785ac05d5b21b1fef0d5aa2d6..ebac0fe33b206dcade3ddeb473207631d203531f 100644 (file)
@@ -145,7 +145,7 @@ BasicBlock::iterator
 FastISel::SelectInstructions(BasicBlock::iterator Begin,
                              BasicBlock::iterator End,
                              DenseMap<const Value*, unsigned> &ValueMap,
-                             std::map<const BasicBlock*,
+                             DenseMap<const BasicBlock*,
                                       MachineBasicBlock *> &MBBMap,
                              MachineBasicBlock *mbb) {
   MBB = mbb;
index e789c4e41c1fe066020ae003f9e6a9fa278b4e8a..7ec5b8534dd3d85cf9657570ed92acc2de979879 100644 (file)
@@ -320,7 +320,7 @@ namespace llvm {
     FunctionLoweringInfo(TargetLowering &TLI, Function &Fn,MachineFunction &MF);
 
     /// MBBMap - A mapping from LLVM basic blocks to their machine code entry.
-    std::map<const BasicBlock*, MachineBasicBlock *> MBBMap;
+    DenseMap<const BasicBlock*, MachineBasicBlock *> MBBMap;
 
     /// ValueMap - Since we emit code for the function a basic block at a time,
     /// we must remember which virtual registers hold the values for
@@ -330,7 +330,7 @@ namespace llvm {
     /// StaticAllocaMap - Keep track of frame indices for fixed sized allocas in
     /// the entry block.  This allows the allocas to be efficiently referenced
     /// anywhere in the function.
-    std::map<const AllocaInst*, int> StaticAllocaMap;
+    DenseMap<const AllocaInst*, int> StaticAllocaMap;
 
 #ifndef NDEBUG
     SmallSet<Instruction*, 8> CatchInfoLost;
@@ -1256,7 +1256,7 @@ SDValue SelectionDAGLowering::getValue(const Value *V) {
   // If this is a static alloca, generate it as the frameindex instead of
   // computation.
   if (const AllocaInst *AI = dyn_cast<AllocaInst>(V)) {
-    std::map<const AllocaInst*, int>::iterator SI =
+    DenseMap<const AllocaInst*, int>::iterator SI =
       FuncInfo.StaticAllocaMap.find(AI);
     if (SI != FuncInfo.StaticAllocaMap.end())
       return DAG.getFrameIndex(SI->second, TLI.getPointerTy());