diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-26 01:10:55 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-26 01:10:55 +0000 |
commit | a4e4ffd389497eb28f5fe91521fb71da4340e5d6 (patch) | |
tree | 4b451f9b85311f831df0e12084e3a13e1f4f0258 /include/llvm | |
parent | 4f989451328f638bab0e9535bbc1704ea7262324 (diff) | |
download | external_llvm-a4e4ffd389497eb28f5fe91521fb71da4340e5d6.zip external_llvm-a4e4ffd389497eb28f5fe91521fb71da4340e5d6.tar.gz external_llvm-a4e4ffd389497eb28f5fe91521fb71da4340e5d6.tar.bz2 |
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
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/LatencyPriorityQueue.h | 10 | ||||
-rw-r--r-- | include/llvm/CodeGen/ScheduleDAG.h | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/LatencyPriorityQueue.h b/include/llvm/CodeGen/LatencyPriorityQueue.h index 28b6909..18c418b 100644 --- a/include/llvm/CodeGen/LatencyPriorityQueue.h +++ b/include/llvm/CodeGen/LatencyPriorityQueue.h @@ -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; diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index d771402..076268b 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -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; |