[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachinePassRegistry.h ScheduleDAG.h

Chris Lattner sabre at nondot.org
Fri Feb 2 17:34:29 PST 2007



Changes in directory llvm/include/llvm/CodeGen:

MachinePassRegistry.h updated: 1.3 -> 1.4
ScheduleDAG.h updated: 1.35 -> 1.36
---
Log message:

switch the sched unit map over to use a DenseMap instead of std::map.  This
speeds up isel as a whole time by 2.6%.


---
Diffs of the changes:  (+3 -3)

 MachinePassRegistry.h |    1 -
 ScheduleDAG.h         |    5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/MachinePassRegistry.h
diff -u llvm/include/llvm/CodeGen/MachinePassRegistry.h:1.3 llvm/include/llvm/CodeGen/MachinePassRegistry.h:1.4
--- llvm/include/llvm/CodeGen/MachinePassRegistry.h:1.3	Wed Aug  2 07:30:23 2006
+++ llvm/include/llvm/CodeGen/MachinePassRegistry.h	Fri Feb  2 19:34:13 2007
@@ -19,7 +19,6 @@
 #define LLVM_CODEGEN_MACHINEPASSREGISTRY_H
 
 #include "llvm/CodeGen/Passes.h"
-#include "llvm/CodeGen/ScheduleDAG.h"
 #include "llvm/Support/CommandLine.h"
 
 namespace llvm {


Index: llvm/include/llvm/CodeGen/ScheduleDAG.h
diff -u llvm/include/llvm/CodeGen/ScheduleDAG.h:1.35 llvm/include/llvm/CodeGen/ScheduleDAG.h:1.36
--- llvm/include/llvm/CodeGen/ScheduleDAG.h:1.35	Wed Jan 31 23:32:05 2007
+++ llvm/include/llvm/CodeGen/ScheduleDAG.h	Fri Feb  2 19:34:13 2007
@@ -16,6 +16,7 @@
 #define LLVM_CODEGEN_SCHEDULEDAG_H
 
 #include "llvm/CodeGen/SelectionDAG.h"
+#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallSet.h"
 
 namespace llvm {
@@ -153,7 +154,7 @@
   public:
     virtual ~SchedulingPriorityQueue() {}
   
-    virtual void initNodes(std::map<SDNode*, SUnit*> &SUMap,
+    virtual void initNodes(DenseMap<SDNode*, SUnit*> &SUMap,
                            std::vector<SUnit> &SUnits) = 0;
     virtual void releaseState() = 0;
   
@@ -180,7 +181,7 @@
     MachineConstantPool *ConstPool;       // Target constant pool
     std::vector<SUnit*> Sequence;         // The schedule. Null SUnit*'s
                                           // represent noop instructions.
-    std::map<SDNode*, SUnit*> SUnitMap;   // SDNode to SUnit mapping (n -> 1).
+    DenseMap<SDNode*, SUnit*> SUnitMap;   // SDNode to SUnit mapping (n -> 1).
     std::vector<SUnit> SUnits;            // The scheduling units.
     SmallSet<SDNode*, 16> CommuteSet;     // Nodes the should be commuted.
 






More information about the llvm-commits mailing list