[PATCH] D60187: [ScheduleDAG] Add statistics for maintaining the topological order.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 02:01:41 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL358058: [ScheduleDAG] Add statistics for maintaining the topological order. (authored by fhahn, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60187?vs=193455&id=194464#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60187/new/

https://reviews.llvm.org/D60187

Files:
  llvm/trunk/lib/CodeGen/ScheduleDAG.cpp


Index: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
@@ -14,6 +14,7 @@
 #include "llvm/CodeGen/ScheduleDAG.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/iterator_range.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/ScheduleHazardRecognizer.h"
@@ -37,6 +38,10 @@
 
 #define DEBUG_TYPE "pre-RA-sched"
 
+STATISTIC(NumNewPredsAdded, "Number of times a  single predecessor was added");
+STATISTIC(NumTopoInits,
+          "Number of times the topological order has been recomputed");
+
 #ifndef NDEBUG
 static cl::opt<bool> StressSchedOpt(
   "stress-sched", cl::Hidden, cl::init(false),
@@ -497,6 +502,7 @@
   }
 
   Visited.resize(DAGSize);
+  NumTopoInits++;
 
 #ifndef NDEBUG
   // Check correctness of the ordering
@@ -523,6 +529,8 @@
     // Recompute topological indexes.
     Shift(Visited, LowerBound, UpperBound);
   }
+
+  NumNewPredsAdded++;
 }
 
 void ScheduleDAGTopologicalSort::RemovePred(SUnit *M, SUnit *N) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60187.194464.patch
Type: text/x-patch
Size: 1170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190410/b22ce06b/attachment.bin>


More information about the llvm-commits mailing list