[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 3 02:29:28 PDT 2019
fhahn created this revision.
fhahn added reviewers: MatzeB, atrick, efriedma, niravd.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
This is helpful to measure the impact of D60125 <https://reviews.llvm.org/D60125> on maintaining
topological orders.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D60187
Files:
llvm/lib/CodeGen/ScheduleDAG.cpp
Index: llvm/lib/CodeGen/ScheduleDAG.cpp
===================================================================
--- llvm/lib/CodeGen/ScheduleDAG.cpp
+++ llvm/lib/CodeGen/ScheduleDAG.cpp
@@ -26,6 +26,7 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/Statistic.h"
#include <algorithm>
#include <cassert>
#include <iterator>
@@ -37,6 +38,9 @@
#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 +501,7 @@
}
Visited.resize(DAGSize);
+ NumTopoInits++;
#ifndef NDEBUG
// Check correctness of the ordering
@@ -523,6 +528,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.193455.patch
Type: text/x-patch
Size: 1071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190403/bdf1fee6/attachment.bin>
More information about the llvm-commits
mailing list