diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-21 15:52:51 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-21 15:52:51 +0000 |
commit | e6e1348275008e508190fd41aa015d1b176634aa (patch) | |
tree | 8b24111ecadbf7b35590b7f7c10b9fdfe354df74 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | |
parent | e6aff3db250bf5ab3e3afb2cd3fe2c186496dc97 (diff) | |
download | bcm5719-llvm-e6e1348275008e508190fd41aa015d1b176634aa.tar.gz bcm5719-llvm-e6e1348275008e508190fd41aa015d1b176634aa.zip |
Change ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >
to DenseMap<SDNode*, SUnit*>, and adjust the way cloned SUnit nodes are
handled so that only the original node needs to be in the map.
This speeds up llc on 447.dealII.llvm.bc by about 2%.
llvm-svn: 52576
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp index c2fae250679..909588cad54 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp @@ -177,6 +177,7 @@ void ScheduleDAGList::ListScheduleTopDown() { // While Available queue is not empty, grab the node with the highest // priority. If it is not ready put it back. Schedule the node. std::vector<SUnit*> NotReady; + Sequence.reserve(SUnits.size()); while (!AvailableQueue->empty() || !PendingQueue.empty()) { // Check to see if any of the pending instructions are ready to issue. If // so, add them to the available queue. @@ -319,7 +320,7 @@ public: LatencyPriorityQueue() : Queue(latency_sort(this)) { } - void initNodes(DenseMap<SDNode*, std::vector<SUnit*> > &sumap, + void initNodes(DenseMap<SDNode*, SUnit*> &sumap, std::vector<SUnit> &sunits) { SUnits = &sunits; // Calculate node priorities. |