mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 21:05:23 +00:00
Change push_all to a non-virtual function and implement it in the
base class, since all the implementations are the same. llvm-svn: 104659
This commit is contained in:
parent
ba28c900a2
commit
59cddd1327
@ -75,15 +75,7 @@ public:
|
||||
|
||||
bool empty() const { return Queue.empty(); }
|
||||
|
||||
virtual void push(SUnit *U) {
|
||||
push_impl(U);
|
||||
}
|
||||
void push_impl(SUnit *U);
|
||||
|
||||
void push_all(const std::vector<SUnit *> &Nodes) {
|
||||
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
|
||||
push_impl(Nodes[i]);
|
||||
}
|
||||
virtual void push(SUnit *U);
|
||||
|
||||
SUnit *pop() {
|
||||
if (empty()) return NULL;
|
||||
|
@ -427,7 +427,12 @@ namespace llvm {
|
||||
virtual bool empty() const = 0;
|
||||
virtual void push(SUnit *U) = 0;
|
||||
|
||||
virtual void push_all(const std::vector<SUnit *> &Nodes) = 0;
|
||||
void push_all(const std::vector<SUnit *> &Nodes) {
|
||||
for (std::vector<SUnit *>::const_iterator I = Nodes.begin(),
|
||||
E = Nodes.end(); I != E; ++I)
|
||||
push(*I);
|
||||
}
|
||||
|
||||
virtual SUnit *pop() = 0;
|
||||
|
||||
virtual void remove(SUnit *SU) = 0;
|
||||
|
@ -68,7 +68,7 @@ SUnit *LatencyPriorityQueue::getSingleUnscheduledPred(SUnit *SU) {
|
||||
return OnlyAvailablePred;
|
||||
}
|
||||
|
||||
void LatencyPriorityQueue::push_impl(SUnit *SU) {
|
||||
void LatencyPriorityQueue::push(SUnit *SU) {
|
||||
// Look at all of the successors of this node. Count the number of nodes that
|
||||
// this node is the sole unscheduled node for.
|
||||
unsigned NumNodesBlocking = 0;
|
||||
|
@ -1115,11 +1115,6 @@ namespace {
|
||||
Queue.push(U);
|
||||
}
|
||||
|
||||
void push_all(const std::vector<SUnit *> &Nodes) {
|
||||
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
|
||||
push(Nodes[i]);
|
||||
}
|
||||
|
||||
SUnit *pop() {
|
||||
if (empty()) return NULL;
|
||||
SUnit *V = Queue.top();
|
||||
|
Loading…
x
Reference in New Issue
Block a user