[NFC][llvm-exegesis] Docs/help: opcode-index=-1 means measure everything
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 13 Feb 2020 09:45:15 +0000 (12:45 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 13 Feb 2020 09:46:12 +0000 (12:46 +0300)
llvm/docs/CommandGuide/llvm-exegesis.rst
llvm/tools/llvm-exegesis/llvm-exegesis.cpp

index 0a5b099..31be33c 100644 (file)
@@ -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>,...
index c086abb..3adc9f0 100644 (file)
@@ -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",