Add isInsertSubreg property.
[oota-llvm.git] / include / llvm / CodeGen / LatencyPriorityQueue.h
index 07d04288ce00839a5f6fc36bd05a0964ddeb0bc4..cf601ae5384c335aa385a8b1112eb09b18e6260a 100644 (file)
@@ -13,8 +13,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LATENCY_PRIORITY_QUEUE_H
-#define LATENCY_PRIORITY_QUEUE_H
+#ifndef LLVM_CODEGEN_LATENCYPRIORITYQUEUE_H
+#define LLVM_CODEGEN_LATENCYPRIORITYQUEUE_H
 
 #include "llvm/CodeGen/ScheduleDAG.h"
 
@@ -47,20 +47,22 @@ namespace llvm {
     LatencyPriorityQueue() : Picker(this) {
     }
 
-    void initNodes(std::vector<SUnit> &sunits) {
+    bool isBottomUp() const override { return false; }
+
+    void initNodes(std::vector<SUnit> &sunits) override {
       SUnits = &sunits;
       NumNodesSolelyBlocking.resize(SUnits->size(), 0);
     }
 
-    void addNode(const SUnit *SU) {
+    void addNode(const SUnit *SU) override {
       NumNodesSolelyBlocking.resize(SUnits->size(), 0);
     }
 
-    void updateNode(const SUnit *SU) {
+    void updateNode(const SUnit *SU) override {
     }
 
-    void releaseState() {
-      SUnits = 0;
+    void releaseState() override {
+      SUnits = nullptr;
     }
 
     unsigned getLatency(unsigned NodeNum) const {
@@ -73,19 +75,21 @@ namespace llvm {
       return NumNodesSolelyBlocking[NodeNum];
     }
 
-    bool empty() const { return Queue.empty(); }
+    bool empty() const override { return Queue.empty(); }
+
+    void push(SUnit *U) override;
 
-    virtual void push(SUnit *U);
+    SUnit *pop() override;
 
-    virtual SUnit *pop();
+    void remove(SUnit *SU) override;
 
-    virtual void remove(SUnit *SU);
+    void dump(ScheduleDAG* DAG) const override;
 
-    // ScheduledNode - As nodes are scheduled, we look to see if there are any
+    // scheduledNode - As nodes are scheduled, we look to see if there are any
     // successor nodes that have a single unscheduled predecessor.  If so, that
     // single predecessor has a higher priority, since scheduling it will make
     // the node available.
-    void ScheduledNode(SUnit *Node);
+    void scheduledNode(SUnit *Node) override;
 
 private:
     void AdjustPriorityOfUnscheduledPreds(SUnit *SU);