[llvm] r353021 - [llvm-exegesis] Don't default to running&dumping all analyses to '-'
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 01:12:08 PST 2019
Author: lebedevri
Date: Mon Feb 4 01:12:08 2019
New Revision: 353021
URL: http://llvm.org/viewvc/llvm-project?rev=353021&view=rev
Log:
[llvm-exegesis] Don't default to running&dumping all analyses to '-'
Summary:
Up until the point i have looked in the source, i didn't even understood that
i can disable 'cluster' output. I have always silenced it via ` &> /dev/null`.
(And hoped it wasn't contributing much of the run time.)
While i expect that it has it's use-cases i never once needed it so far.
If i forget to silence it, console is completely flooded with that output.
How about not expecting users to opt-out of analyses,
but to explicitly specify the analyses that should be performed?
Reviewers: courbet, gchatelet
Reviewed By: courbet
Subscribers: tschuett, RKSimon, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57648
Modified:
llvm/trunk/docs/CommandGuide/llvm-exegesis.rst
llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-backwards.test
llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-variant.test
llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops.test
llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
Modified: llvm/trunk/docs/CommandGuide/llvm-exegesis.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-exegesis.rst?rev=353021&r1=353020&r2=353021&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-exegesis.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-exegesis.rst Mon Feb 4 01:12:08 2019
@@ -190,7 +190,9 @@ OPTIONS
.. option:: -mode=[latency|uops|inverse_throughput|analysis]
- Specify the run mode.
+ Specify the run mode. Note that if you pick `analysis` mode, you also need
+ to specify at least one of the `-analysis-clusters-output-file=` and
+ `-analysis-inconsistencies-output-file=`.
.. option:: -num-repetitions=<Number of repetition>
@@ -205,12 +207,12 @@ OPTIONS
.. option:: -analysis-clusters-output-file=</path/to/file>
If provided, write the analysis clusters as CSV to this file. "-" prints to
- stdout.
+ stdout. By default, this analysis is not run.
.. option:: -analysis-inconsistencies-output-file=</path/to/file>
If non-empty, write inconsistencies found during analysis to this file. `-`
- prints to stdout.
+ prints to stdout. By default, this analysis is not run.
.. option:: -analysis-numpoints=<dbscan numPoints parameter>
Modified: llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-backwards.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-backwards.test?rev=353021&r1=353020&r2=353021&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-backwards.test (original)
+++ llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-backwards.test Mon Feb 4 01:12:08 2019
@@ -1,5 +1,5 @@
# This tests backwards-compatibility of the yaml schema (see PR39082).
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file="" -analysis-numpoints=1 | FileCheck %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-numpoints=1 | FileCheck %s
# CHECK: cluster_id,opcode_name,config,sched_class,HWPort0,HWPort1,HWPort2,HWPort3,HWPort4,HWPort5,HWPort6,HWPort7,NumMicroOps
# CHECK-NEXT: vzeroall
Modified: llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-variant.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-variant.test?rev=353021&r1=353020&r2=353021&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-variant.test (original)
+++ llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops-variant.test Mon Feb 4 01:12:08 2019
@@ -1,4 +1,4 @@
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file="" -analysis-numpoints=1 | FileCheck %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-numpoints=1 | FileCheck %s
# REQUIRES: asserts
# (sched class name is NDEBUG only)
Modified: llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops.test?rev=353021&r1=353020&r2=353021&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops.test (original)
+++ llvm/trunk/test/tools/llvm-exegesis/X86/analysis-uops.test Mon Feb 4 01:12:08 2019
@@ -1,4 +1,4 @@
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file="" -analysis-numpoints=1 | FileCheck %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-numpoints=1 | FileCheck %s
# CHECK: cluster_id,opcode_name,config,sched_class,HWPort0,HWPort1,HWPort2,HWPort3,HWPort4,HWPort5,HWPort6,HWPort7,NumMicroOps
# CHECK-NEXT: vzeroall
Modified: llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp?rev=353021&r1=353020&r2=353021&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp Mon Feb 4 01:12:08 2019
@@ -91,10 +91,10 @@ static cl::opt<float>
static cl::opt<std::string>
AnalysisClustersOutputFile("analysis-clusters-output-file", cl::desc(""),
- cl::init("-"));
+ cl::init(""));
static cl::opt<std::string>
AnalysisInconsistenciesOutputFile("analysis-inconsistencies-output-file",
- cl::desc(""), cl::init("-"));
+ cl::desc(""), cl::init(""));
static cl::opt<std::string>
CpuName("mcpu",
@@ -404,6 +404,13 @@ static void analysisMain() {
if (BenchmarkFile.empty())
llvm::report_fatal_error("--benchmarks-file must be set.");
+ if (AnalysisClustersOutputFile.empty() &&
+ AnalysisInconsistenciesOutputFile.empty()) {
+ llvm::report_fatal_error(
+ "At least one of --analysis-clusters-output-file and "
+ "--analysis-inconsistencies-output-file must be specified.");
+ }
+
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
llvm::InitializeNativeTargetDisassembler();
More information about the llvm-commits
mailing list