[llvm] r334833 - [MCA] Add -summary-view option
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 15 07:01:43 PDT 2018
Author: lebedevri
Date: Fri Jun 15 07:01:43 2018
New Revision: 334833
URL: http://llvm.org/viewvc/llvm-project?rev=334833&view=rev
Log:
[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
Modified:
llvm/trunk/test/tools/llvm-mca/X86/option-all-stats-1.s
llvm/trunk/test/tools/llvm-mca/X86/option-all-views-1.s
llvm/trunk/test/tools/llvm-mca/X86/register-file-statistics.s
llvm/trunk/test/tools/llvm-mca/X86/scheduler-queue-usage.s
llvm/trunk/tools/llvm-mca/llvm-mca.cpp
Modified: llvm/trunk/test/tools/llvm-mca/X86/option-all-stats-1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/option-all-stats-1.s?rev=334833&r1=334832&r2=334833&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/option-all-stats-1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/option-all-stats-1.s Fri Jun 15 07:01:43 2018
@@ -6,12 +6,12 @@
add %eax, %eax
-# ALL: Iterations: 100
-# ALL-NEXT: Instructions: 100
-# ALL-NEXT: Total Cycles: 103
-# ALL-NEXT: Dispatch Width: 2
-# ALL-NEXT: IPC: 0.97
-# ALL-NEXT: Block RThroughput: 0.5
+# FULLREPORT: Iterations: 100
+# FULLREPORT-NEXT: Instructions: 100
+# FULLREPORT-NEXT: Total Cycles: 103
+# FULLREPORT-NEXT: Dispatch Width: 2
+# FULLREPORT-NEXT: IPC: 0.97
+# FULLREPORT-NEXT: Block RThroughput: 0.5
# ALL: Instruction Info:
# ALL-NEXT: [1]: #uOps
Modified: llvm/trunk/test/tools/llvm-mca/X86/option-all-views-1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/option-all-views-1.s?rev=334833&r1=334832&r2=334833&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/option-all-views-1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/option-all-views-1.s Fri Jun 15 07:01:43 2018
@@ -1,17 +1,19 @@
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views < %s | FileCheck %s -check-prefix=ALL -check-prefix=DEFAULTREPORT -check-prefix=FULLREPORT
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=true < %s | FileCheck %s -check-prefix=ALL -check-prefix=DEFAULTREPORT -check-prefix=FULLREPORT
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOREPORT
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 < %s | FileCheck %s -check-prefix=ALL -check-prefix=DEFAULTREPORT
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views < %s | FileCheck %s -check-prefix=DEFAULTREPORT -check-prefix=FULLREPORT
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=true < %s | FileCheck %s -check-prefix=DEFAULTREPORT -check-prefix=FULLREPORT
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=false < %s | FileCheck %s -check-prefix=NOREPORT -allow-empty
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 < %s | FileCheck %s -check-prefix=DEFAULTREPORT
add %eax, %eax
-# ALL: Iterations: 100
-# ALL-NEXT: Instructions: 100
-# ALL-NEXT: Total Cycles: 103
-# ALL-NEXT: Dispatch Width: 2
-# ALL-NEXT: IPC: 0.97
-# ALL-NEXT: Block RThroughput: 0.5
+# NOREPORT-NOT: {{.}}
+
+# DEFAULTREPORT: Iterations: 100
+# DEFAULTREPORT-NEXT: Instructions: 100
+# DEFAULTREPORT-NEXT: Total Cycles: 103
+# DEFAULTREPORT-NEXT: Dispatch Width: 2
+# DEFAULTREPORT-NEXT: IPC: 0.97
+# DEFAULTREPORT-NEXT: Block RThroughput: 0.5
# DEFAULTREPORT: Instruction Info:
# DEFAULTREPORT-NEXT: [1]: #uOps
Modified: llvm/trunk/test/tools/llvm-mca/X86/register-file-statistics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/register-file-statistics.s?rev=334833&r1=334832&r2=334833&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/register-file-statistics.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/register-file-statistics.s Fri Jun 15 07:01:43 2018
@@ -12,34 +12,6 @@
xor %eax, %ebx
-# ALL: Iterations: 1
-# ALL-NEXT: Instructions: 1
-# ALL-NEXT: Total Cycles: 4
-
-# BDW-NEXT: Dispatch Width: 4
-# BTVER2-NEXT: Dispatch Width: 2
-# HSW-NEXT: Dispatch Width: 4
-# IVB-NEXT: Dispatch Width: 4
-# KNL-NEXT: Dispatch Width: 4
-# SKX-NEXT: Dispatch Width: 6
-# SKX-AVX512-NEXT: Dispatch Width: 6
-# SLM-NEXT: Dispatch Width: 2
-# SNB-NEXT: Dispatch Width: 4
-# ZNVER1-NEXT: Dispatch Width: 4
-
-# ALL-NEXT: IPC: 0.25
-
-# BDW-NEXT: Block RThroughput: 0.3
-# BTVER2-NEXT: Block RThroughput: 0.5
-# HSW-NEXT: Block RThroughput: 0.3
-# IVB-NEXT: Block RThroughput: 0.3
-# KNL-NEXT: Block RThroughput: 0.3
-# SKX-NEXT: Block RThroughput: 0.3
-# SKX-AVX512-NEXT: Block RThroughput: 0.3
-# SLM-NEXT: Block RThroughput: 0.5
-# SNB-NEXT: Block RThroughput: 0.3
-# ZNVER1-NEXT: Block RThroughput: 0.3
-
# ALL: Register File statistics:
# ALL-NEXT: Total number of mappings created: 2
# ALL-NEXT: Max number of mappings used: 2
Modified: llvm/trunk/test/tools/llvm-mca/X86/scheduler-queue-usage.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/scheduler-queue-usage.s?rev=334833&r1=334832&r2=334833&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/scheduler-queue-usage.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/scheduler-queue-usage.s Fri Jun 15 07:01:43 2018
@@ -12,34 +12,6 @@
xor %eax, %ebx
-# ALL: Iterations: 1
-# ALL-NEXT: Instructions: 1
-# ALL-NEXT: Total Cycles: 4
-
-# BDW-NEXT: Dispatch Width: 4
-# BTVER2-NEXT: Dispatch Width: 2
-# HSW-NEXT: Dispatch Width: 4
-# IVB-NEXT: Dispatch Width: 4
-# KNL-NEXT: Dispatch Width: 4
-# SKX-NEXT: Dispatch Width: 6
-# SKX-AVX512-NEXT: Dispatch Width: 6
-# SLM-NEXT: Dispatch Width: 2
-# SNB-NEXT: Dispatch Width: 4
-# ZNVER1-NEXT: Dispatch Width: 4
-
-# ALL-NEXT: IPC: 0.25
-
-# BDW-NEXT: Block RThroughput: 0.3
-# BTVER2-NEXT: Block RThroughput: 0.5
-# HSW-NEXT: Block RThroughput: 0.3
-# IVB-NEXT: Block RThroughput: 0.3
-# KNL-NEXT: Block RThroughput: 0.3
-# SKX-NEXT: Block RThroughput: 0.3
-# SKX-AVX512-NEXT: Block RThroughput: 0.3
-# SLM-NEXT: Block RThroughput: 0.5
-# SNB-NEXT: Block RThroughput: 0.3
-# ZNVER1-NEXT: Block RThroughput: 0.3
-
# ALL: Schedulers - number of cycles where we saw N instructions issued:
# ALL-NEXT: [# issued], [# cycles]
# ALL-NEXT: 0, 3 (75.0%)
Modified: llvm/trunk/tools/llvm-mca/llvm-mca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/llvm-mca.cpp?rev=334833&r1=334832&r2=334833&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/llvm-mca.cpp (original)
+++ llvm/trunk/tools/llvm-mca/llvm-mca.cpp Fri Jun 15 07:01:43 2018
@@ -109,6 +109,11 @@ static cl::opt<bool> PrintDispatchStats(
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));
More information about the llvm-commits
mailing list