mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Change push_all to a non-virtual function and implement it in the
base class, since all the implementations are the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4f98945132
commit
a4e4ffd389
@ -75,15 +75,7 @@ public:
|
|||||||
|
|
||||||
bool empty() const { return Queue.empty(); }
|
bool empty() const { return Queue.empty(); }
|
||||||
|
|
||||||
virtual void push(SUnit *U) {
|
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]);
|
|
||||||
}
|
|
||||||
|
|
||||||
SUnit *pop() {
|
SUnit *pop() {
|
||||||
if (empty()) return NULL;
|
if (empty()) return NULL;
|
||||||
|
@ -427,7 +427,12 @@ namespace llvm {
|
|||||||
virtual bool empty() const = 0;
|
virtual bool empty() const = 0;
|
||||||
virtual void push(SUnit *U) = 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 SUnit *pop() = 0;
|
||||||
|
|
||||||
virtual void remove(SUnit *SU) = 0;
|
virtual void remove(SUnit *SU) = 0;
|
||||||
|
@ -68,7 +68,7 @@ SUnit *LatencyPriorityQueue::getSingleUnscheduledPred(SUnit *SU) {
|
|||||||
return OnlyAvailablePred;
|
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
|
// Look at all of the successors of this node. Count the number of nodes that
|
||||||
// this node is the sole unscheduled node for.
|
// this node is the sole unscheduled node for.
|
||||||
unsigned NumNodesBlocking = 0;
|
unsigned NumNodesBlocking = 0;
|
||||||
|
@ -1115,11 +1115,6 @@ namespace {
|
|||||||
Queue.push(U);
|
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() {
|
SUnit *pop() {
|
||||||
if (empty()) return NULL;
|
if (empty()) return NULL;
|
||||||
SUnit *V = Queue.top();
|
SUnit *V = Queue.top();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user