[llvm] r330117 - [LatencyPriorityQueue] The LatencyPriorityQueue class is missing the implementation for the dump function

Stefan Pintilie via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 16 03:20:56 PDT 2018


Author: stefanp
Date: Mon Apr 16 03:20:56 2018
New Revision: 330117

URL: http://llvm.org/viewvc/llvm-project?rev=330117&view=rev
Log:
[LatencyPriorityQueue] The LatencyPriorityQueue class is missing the implementation for the dump function

Added implementation of the dump function for LatencyPriorityQueue.

Modified:
    llvm/trunk/include/llvm/CodeGen/LatencyPriorityQueue.h

Modified: llvm/trunk/include/llvm/CodeGen/LatencyPriorityQueue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LatencyPriorityQueue.h?rev=330117&r1=330116&r2=330117&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LatencyPriorityQueue.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LatencyPriorityQueue.h Mon Apr 16 03:20:56 2018
@@ -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




More information about the llvm-commits mailing list