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 | 4c8c83022b501759d8559e224c84ae2a9921ba41 (patch) | |
tree | 5df6ec8924dbc464433d326264e44beaed92605c /lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | |
parent | 4ce138cc5593fb17161308af3cf25981b4088c17 (diff) | |
download | external_llvm-4c8c83022b501759d8559e224c84ae2a9921ba41.tar.gz external_llvm-4c8c83022b501759d8559e224c84ae2a9921ba41.tar.bz2 external_llvm-4c8c83022b501759d8559e224c84ae2a9921ba41.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%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp index c2fae25067..909588cad5 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp +++ b/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. |