summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoman Levenstein <romix.llvm@googlemail.com>2008-04-29 09:07:59 +0000
committerRoman Levenstein <romix.llvm@googlemail.com>2008-04-29 09:07:59 +0000
commita0201d52049be8dcefffe4304a49690a831bcb34 (patch)
tree5bd69deb9eb3060895d6b56424cb53f9a9f4cc2b /include
parent5b222d748a0976497297fa77d1dd36328331e32c (diff)
downloadllvm-a0201d52049be8dcefffe4304a49690a831bcb34.tar.gz
llvm-a0201d52049be8dcefffe4304a49690a831bcb34.tar.bz2
llvm-a0201d52049be8dcefffe4304a49690a831bcb34.tar.xz
Use std::set instead of std::priority_queue for the RegReductionPriorityQueue.
This removes the existing bottleneck related to the removal of elements from the middle of the queue. Also fixes a subtle bug in ScheduleDAGRRList::CapturePred: It was updating the state of the SUnit before removing it. As a result, the comparison operators were working incorrectly and this SUnit could not be removed from the queue properly. Reviewed by Evan and Dan. Approved by Dan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/ScheduleDAG.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h
index bc9ec11260..c611bfae5c 100644
--- a/include/llvm/CodeGen/ScheduleDAG.h
+++ b/include/llvm/CodeGen/ScheduleDAG.h
@@ -112,6 +112,7 @@ namespace llvm {
typedef SmallVector<SDep, 4>::const_iterator const_succ_iterator;
unsigned NodeNum; // Entry # of node in the node vector.
+ unsigned NodeQueueId; // Queue id of node.
unsigned short Latency; // Node latency.
short NumPreds; // # of preds.
short NumSuccs; // # of sucss.
@@ -131,7 +132,7 @@ namespace llvm {
const TargetRegisterClass *CopySrcRC;
SUnit(SDNode *node, unsigned nodenum)
- : Node(node), InstanceNo(0), NodeNum(nodenum), Latency(0),
+ : Node(node), InstanceNo(0), NodeNum(nodenum), NodeQueueId(0), Latency(0),
NumPreds(0), NumSuccs(0), NumPredsLeft(0), NumSuccsLeft(0),
isTwoAddress(false), isCommutable(false), hasPhysRegDefs(false),
isPending(false), isAvailable(false), isScheduled(false),