[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp ScheduleDAGRRList.cpp
Chris Lattner
sabre at nondot.org
Fri Feb 2 17:34:31 PST 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAGList.cpp updated: 1.71 -> 1.72
ScheduleDAGRRList.cpp updated: 1.26 -> 1.27
---
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: (+6 -6)
ScheduleDAGList.cpp | 2 +-
ScheduleDAGRRList.cpp | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.71 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.72
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.71 Tue Dec 19 16:41:21 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp Fri Feb 2 19:34:13 2007
@@ -328,7 +328,7 @@
LatencyPriorityQueue() : Queue(latency_sort(this)) {
}
- void initNodes(std::map<SDNode*, SUnit*> &sumap,
+ void initNodes(DenseMap<SDNode*, SUnit*> &sumap,
std::vector<SUnit> &sunits) {
SUnits = &sunits;
// Calculate node priorities.
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.26 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.27
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.26 Wed Jan 31 22:55:59 2007
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Fri Feb 2 19:34:13 2007
@@ -430,7 +430,7 @@
RegReductionPriorityQueue() :
Queue(SF(this)) {}
- virtual void initNodes(std::map<SDNode*, SUnit*> &sumap,
+ virtual void initNodes(DenseMap<SDNode*, SUnit*> &sumap,
std::vector<SUnit> &sunits) {}
virtual void releaseState() {}
@@ -464,7 +464,7 @@
class VISIBILITY_HIDDEN BURegReductionPriorityQueue
: public RegReductionPriorityQueue<SF> {
// SUnitMap SDNode to SUnit mapping (n -> 1).
- std::map<SDNode*, SUnit*> *SUnitMap;
+ DenseMap<SDNode*, SUnit*> *SUnitMap;
// SUnits - The SUnits for the current graph.
const std::vector<SUnit> *SUnits;
@@ -477,7 +477,7 @@
BURegReductionPriorityQueue(const TargetInstrInfo *tii)
: TII(tii) {}
- void initNodes(std::map<SDNode*, SUnit*> &sumap,
+ void initNodes(DenseMap<SDNode*, SUnit*> &sumap,
std::vector<SUnit> &sunits) {
SUnitMap = &sumap;
SUnits = &sunits;
@@ -541,7 +541,7 @@
template<class SF>
class TDRegReductionPriorityQueue : public RegReductionPriorityQueue<SF> {
// SUnitMap SDNode to SUnit mapping (n -> 1).
- std::map<SDNode*, SUnit*> *SUnitMap;
+ DenseMap<SDNode*, SUnit*> *SUnitMap;
// SUnits - The SUnits for the current graph.
const std::vector<SUnit> *SUnits;
@@ -552,7 +552,7 @@
public:
TDRegReductionPriorityQueue() {}
- void initNodes(std::map<SDNode*, SUnit*> &sumap,
+ void initNodes(DenseMap<SDNode*, SUnit*> &sumap,
std::vector<SUnit> &sunits) {
SUnitMap = &sumap;
SUnits = &sunits;
More information about the llvm-commits
mailing list