[llvm] cc5549d - [NFC][llvm-exegesis] Docs/help: opcode-index=-1 means measure everything
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 01:46:23 PST 2020
Author: Roman Lebedev
Date: 2020-02-13T12:46:12+03:00
New Revision: cc5549dbc2f4f3189bb655fb19a257cfbe7d6dab
URL: https://github.com/llvm/llvm-project/commit/cc5549dbc2f4f3189bb655fb19a257cfbe7d6dab
DIFF: https://github.com/llvm/llvm-project/commit/cc5549dbc2f4f3189bb655fb19a257cfbe7d6dab.diff
LOG: [NFC][llvm-exegesis] Docs/help: opcode-index=-1 means measure everything
Added:
Modified:
llvm/docs/CommandGuide/llvm-exegesis.rst
llvm/tools/llvm-exegesis/llvm-exegesis.cpp
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/llvm-exegesis.rst b/llvm/docs/CommandGuide/llvm-exegesis.rst
index 0a5b0990d2ee..31be33cc861f 100644
--- a/llvm/docs/CommandGuide/llvm-exegesis.rst
+++ b/llvm/docs/CommandGuide/llvm-exegesis.rst
@@ -175,7 +175,8 @@ OPTIONS
.. option:: -opcode-index=<LLVM opcode index>
- Specify the opcode to measure, by index. See example 1 for details.
+ Specify the opcode to measure, by index. Specifying `-1` will result
+ in measuring every existing opcode. See example 1 for details.
Either `opcode-index`, `opcode-name` or `snippets-file` must be set.
.. option:: -opcode-name=<opcode name 1>,<opcode name 2>,...
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index c086abbb80df..3adc9f0ca19e 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -47,9 +47,10 @@ static cl::OptionCategory Options("llvm-exegesis options");
static cl::OptionCategory BenchmarkOptions("llvm-exegesis benchmark options");
static cl::OptionCategory AnalysisOptions("llvm-exegesis analysis options");
-static cl::opt<int> OpcodeIndex("opcode-index",
- cl::desc("opcode to measure, by index"),
- cl::cat(BenchmarkOptions), cl::init(0));
+static cl::opt<int> OpcodeIndex(
+ "opcode-index",
+ cl::desc("opcode to measure, by index, or -1 to measure all opcodes"),
+ cl::cat(BenchmarkOptions), cl::init(0));
static cl::opt<std::string>
OpcodeNames("opcode-name",
More information about the llvm-commits
mailing list