[llvm-commits] [llvm] r55220 - in /llvm/trunk: include/llvm/CodeGen/FastISel.h lib/CodeGen/SelectionDAG/FastISel.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Dan Gohman gohman at apple.com
Fri Aug 22 19:44:46 PDT 2008


Author: djg
Date: Fri Aug 22 21:44:46 2008
New Revision: 55220

URL: http://llvm.org/viewvc/llvm-project?rev=55220&view=rev
Log:
Make MBBMap a DenseMap instead of a std::map.

Modified:
    llvm/trunk/include/llvm/CodeGen/FastISel.h
    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FastISel.h?rev=55220&r1=55219&r2=55220&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/FastISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/FastISel.h Fri Aug 22 21:44:46 2008
@@ -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 @@
   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();

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55220&r1=55219&r2=55220&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Fri Aug 22 21:44:46 2008
@@ -145,7 +145,7 @@
 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;

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=55220&r1=55219&r2=55220&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Aug 22 21:44:46 2008
@@ -320,7 +320,7 @@
     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 @@
     /// 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 @@
   // 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());





More information about the llvm-commits mailing list