summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-03 01:34:13 +0000
committerChris Lattner <sabre@nondot.org>2007-02-03 01:34:13 +0000
commit2ba528b3a75955c960347e5b5b28ae74d5a81909 (patch)
treed52af735ee069c5ffbd5a66cacd74c15c6f01e8c /include
parent7971514755a08ec156a1b9c0f7f05d67919c56b7 (diff)
downloadllvm-2ba528b3a75955c960347e5b5b28ae74d5a81909.tar.gz
llvm-2ba528b3a75955c960347e5b5b28ae74d5a81909.tar.bz2
llvm-2ba528b3a75955c960347e5b5b28ae74d5a81909.tar.xz
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%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachinePassRegistry.h1
-rw-r--r--include/llvm/CodeGen/ScheduleDAG.h5
2 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachinePassRegistry.h b/include/llvm/CodeGen/MachinePassRegistry.h
index 64d364e224..4bb34b02e5 100644
--- a/include/llvm/CodeGen/MachinePassRegistry.h
+++ b/include/llvm/CodeGen/MachinePassRegistry.h
@@ -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 {
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h
index 86e08fe9d9..e205306fa7 100644
--- a/include/llvm/CodeGen/ScheduleDAG.h
+++ b/include/llvm/CodeGen/ScheduleDAG.h
@@ -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 @@ namespace llvm {
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 @@ namespace llvm {
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.