[llvm-mca] Move the logic that prints scheduler statistics from BackendStatistics to its own view.
Added flag -scheduler-stats to print scheduler related statistics.
llvm-svn: 329792
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index f49ae23..7b50196 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -29,6 +29,7 @@
#include "InstructionTables.h"
#include "RegisterFileStatistics.h"
#include "ResourcePressureView.h"
+#include "SchedulerStatistics.h"
#include "SummaryView.h"
#include "TimelineView.h"
#include "llvm/MC/MCAsmInfo.h"
@@ -100,6 +101,11 @@
cl::init(false));
static cl::opt<bool>
+ PrintiSchedulerStats("scheduler-stats",
+ cl::desc("Print scheduler statistics"),
+ cl::init(false));
+
+static cl::opt<bool>
PrintResourcePressureView("resource-pressure",
cl::desc("Print the resource pressure view"),
cl::init(true));
@@ -432,6 +438,9 @@
if (PrintDispatchStats)
Printer.addView(llvm::make_unique<mca::DispatchStatistics>(*STI));
+ if (PrintiSchedulerStats)
+ Printer.addView(llvm::make_unique<mca::SchedulerStatistics>(*STI));
+
if (PrintModeVerbose)
Printer.addView(llvm::make_unique<mca::BackendStatistics>(*STI));