summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/llvm-mca.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2018-06-15 14:01:43 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2018-06-15 14:01:43 +0000
commit9ddf128f79b43d29d3c31e529087ac112a6a26be (patch)
treeb848ce07cf7ab86c4be8bdf6cb61ea7636d95e6d /llvm/tools/llvm-mca/llvm-mca.cpp
parent7c423001e48bc63f96598a75cea1f0b17fad0262 (diff)
downloadbcm5719-llvm-9ddf128f79b43d29d3c31e529087ac112a6a26be.tar.gz
bcm5719-llvm-9ddf128f79b43d29d3c31e529087ac112a6a26be.zip
[MCA] Add -summary-view option
Summary: While that is indeed a quite interesting summary stat, there are cases where it does not really add anything other than consuming extra lines. Declutters the output of D48190. Reviewers: RKSimon, andreadb, courbet, craig.topper Reviewed By: andreadb Subscribers: javed.absar, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D48209 llvm-svn: 334833
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
-rw-r--r--llvm/tools/llvm-mca/llvm-mca.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index 925584b0193..4d10704c10c 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -109,6 +109,11 @@ static cl::opt<bool> PrintDispatchStats("dispatch-stats",
cl::desc("Print dispatch statistics"),
cl::cat(ViewOptions), cl::init(false));
+static cl::opt<bool>
+ PrintSummaryView("summary-view", cl::Hidden,
+ cl::desc("Print summary view (enabled by default)"),
+ cl::cat(ViewOptions), cl::init(true));
+
static cl::opt<bool> PrintSchedulerStats("scheduler-stats",
cl::desc("Print scheduler statistics"),
cl::cat(ViewOptions), cl::init(false));
@@ -302,6 +307,7 @@ static void processViewOptions() {
return;
if (EnableAllViews.getNumOccurrences()) {
+ processOptionImpl(PrintSummaryView, EnableAllViews);
processOptionImpl(PrintResourcePressureView, EnableAllViews);
processOptionImpl(PrintTimelineView, EnableAllViews);
processOptionImpl(PrintInstructionInfoView, EnableAllViews);
@@ -311,6 +317,7 @@ static void processViewOptions() {
EnableAllViews.getPosition() < EnableAllStats.getPosition()
? EnableAllStats
: EnableAllViews;
+ processOptionImpl(PrintSummaryView, Default);
processOptionImpl(PrintRegisterFileStats, Default);
processOptionImpl(PrintDispatchStats, Default);
processOptionImpl(PrintSchedulerStats, Default);
@@ -495,7 +502,9 @@ int main(int argc, char **argv) {
LoadQueueSize, StoreQueueSize, AssumeNoAlias);
mca::BackendPrinter Printer(B);
- Printer.addView(llvm::make_unique<mca::SummaryView>(SM, S, Width));
+ if (PrintSummaryView)
+ Printer.addView(llvm::make_unique<mca::SummaryView>(SM, S, Width));
+
if (PrintInstructionInfoView)
Printer.addView(
llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, S, *IP));
OpenPOWER on IntegriCloud