OSDN Git Service

[LatencyPriorityQueue] The LatencyPriorityQueue class is missing the implementation...
authorStefan Pintilie <stefanp@ca.ibm.com>
Mon, 16 Apr 2018 10:20:56 +0000 (10:20 +0000)
committerStefan Pintilie <stefanp@ca.ibm.com>
Mon, 16 Apr 2018 10:20:56 +0000 (10:20 +0000)
Added implementation of the dump function for LatencyPriorityQueue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330117 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LatencyPriorityQueue.h

index 988e6d6..83ad73a 100644 (file)
@@ -83,6 +83,17 @@ namespace llvm {
 
     void remove(SUnit *SU) override;
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+    LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const {
+      dbgs() << "Latency Priority Queue\n";
+      dbgs() << "  Number of Queue Entries: " << Queue.size() << "\n";
+      for (auto const &SU : Queue) {
+        dbgs() << "    ";
+        SU->dump(DAG);
+      }
+    }
+#endif
+
     // 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