llvm.org GIT mirror llvm / 681f332
[llvm-exegesis] Separate tool options into three categories. Results in much nicer -help output: ``` $ ./bin/llvm-exegesis -help USAGE: llvm-exegesis [options] OPTIONS: Color Options: -color - Use colors in output (default=autodetect) General options: -enable-cse-in-irtranslator - Should enable CSE in irtranslator -enable-cse-in-legalizer - Should enable CSE in Legalizer Generic Options: -help - Display available options (-help-hidden for more) -help-list - Display list of available options (-help-list-hidden for more) -version - Display the version of this program llvm-exegesis analysis options: -analysis-clustering-epsilon=<number> - dbscan epsilon for benchmark point clustering -analysis-clusters-output-file=<string> - -analysis-display-unstable-clusters - if there is more than one benchmark for an opcode, said benchmarks may end up not being clustered into the same cluster if the measured performance characteristics are different. by default all such opcodes are filtered out. this flag will instead show only such unstable opcodes -analysis-inconsistencies-output-file=<string> - -analysis-inconsistency-epsilon=<number> - epsilon for detection of when the cluster is different from the LLVM schedule profile values -analysis-numpoints=<uint> - minimum number of points in an analysis cluster llvm-exegesis benchmark options: -ignore-invalid-sched-class - ignore instructions that do not define a sched class -mode=<value> - the mode to run =latency - Instruction Latency =inverse_throughput - Instruction Inverse Throughput =uops - Uop Decomposition =analysis - Analysis -num-repetitions=<uint> - number of time to repeat the asm snippet -opcode-index=<int> - opcode to measure, by index -opcode-name=<string> - comma-separated list of opcodes to measure, by name -snippets-file=<string> - code snippets to measure llvm-exegesis options: -benchmarks-file=<string> - File to read (analysis mode) or write (latency/uops/inverse_throughput modes) benchmark results. “-” uses stdin/stdout. -mcpu=<string> - cpu name to use for pfm counters, leave empty to autodetect ``` git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356364 91177308-0d34-0410-b5e6-96231b3b80d8 Roman Lebedev 1 year, 8 months ago
1 changed file(s) with 30 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
3939 namespace llvm {
4040 namespace exegesis {
4141
42 static cl::OptionCategory Options("llvm-exegesis options");
43 static cl::OptionCategory BenchmarkOptions("llvm-exegesis benchmark options");
44 static cl::OptionCategory AnalysisOptions("llvm-exegesis analysis options");
45
4246 static cl::opt OpcodeIndex("opcode-index",
4347 cl::desc("opcode to measure, by index"),
44 cl::init(0));
48 cl::cat(BenchmarkOptions), cl::init(0));
4549
4650 static cl::opt
4751 OpcodeNames("opcode-name",
4852 cl::desc("comma-separated list of opcodes to measure, by name"),
49 cl::init(""));
53 cl::cat(BenchmarkOptions), cl::init(""));
5054
5155 static cl::opt SnippetsFile("snippets-file",
5256 cl::desc("code snippets to measure"),
57 cl::cat(BenchmarkOptions),
5358 cl::init(""));
5459
55 static cl::opt BenchmarkFile("benchmarks-file", cl::desc(""),
56 cl::init(""));
60 static cl::opt
61 BenchmarkFile("benchmarks-file",
62 cl::desc("File to read (analysis mode) or write "
63 "(latency/uops/inverse_throughput modes) benchmark "
64 "results. “-” uses stdin/stdout."),
65 cl::cat(Options), cl::init(""));
5766
5867 static cl::opt BenchmarkMode(
59 "mode", cl::desc("the mode to run"),
68 "mode", cl::desc("the mode to run"), cl::cat(BenchmarkOptions),
6069 cl::values(clEnumValN(exegesis::InstructionBenchmark::Latency, "latency",
6170 "Instruction Latency"),
6271 clEnumValN(exegesis::InstructionBenchmark::InverseThroughput,
7281 static cl::opt
7382 NumRepetitions("num-repetitions",
7483 cl::desc("number of time to repeat the asm snippet"),
75 cl::init(10000));
84 cl::cat(BenchmarkOptions), cl::init(10000));
7685
7786 static cl::opt IgnoreInvalidSchedClass(
7887 "ignore-invalid-sched-class",
7988 cl::desc("ignore instructions that do not define a sched class"),
80 cl::init(false));
89 cl::cat(BenchmarkOptions), cl::init(false));
8190
8291 static cl::opt AnalysisNumPoints(
8392 "analysis-numpoints",
84 cl::desc("minimum number of points in an analysis cluster"), cl::init(3));
93 cl::desc("minimum number of points in an analysis cluster"),
94 cl::cat(AnalysisOptions), cl::init(3));
8595
8696 static cl::opt AnalysisClusteringEpsilon(
8797 "analysis-clustering-epsilon",
88 cl::desc("dbscan epsilon for benchmark point clustering"), cl::init(0.1));
98 cl::desc("dbscan epsilon for benchmark point clustering"),
99 cl::cat(AnalysisOptions), cl::init(0.1));
89100
90101 static cl::opt AnalysisInconsistencyEpsilon(
91102 "analysis-inconsistency-epsilon",
92103 cl::desc("epsilon for detection of when the cluster is different from the "
93104 "LLVM schedule profile values"),
94 cl::init(0.1));
105 cl::cat(AnalysisOptions), cl::init(0.1));
95106
96107 static cl::opt
97108 AnalysisClustersOutputFile("analysis-clusters-output-file", cl::desc(""),
98 cl::init(""));
109 cl::cat(AnalysisOptions), cl::init(""));
99110 static cl::opt
100111 AnalysisInconsistenciesOutputFile("analysis-inconsistencies-output-file",
101 cl::desc(""), cl::init(""));
112 cl::desc(""), cl::cat(AnalysisOptions),
113 cl::init(""));
102114
103115 static cl::opt AnalysisDisplayUnstableOpcodes(
104116 "analysis-display-unstable-clusters",
107119 "if the measured performance characteristics are different. by "
108120 "default all such opcodes are filtered out. this flag will "
109121 "instead show only such unstable opcodes"),
110 cl::init(false));
111
112 static cl::opt
113 CpuName("mcpu",
114 cl::desc(
115 "cpu name to use for pfm counters, leave empty to autodetect"),
116 cl::init(""));
122 cl::cat(AnalysisOptions), cl::init(false));
123
124 static cl::opt CpuName(
125 "mcpu",
126 cl::desc("cpu name to use for pfm counters, leave empty to autodetect"),
127 cl::cat(Options), cl::init(""));
117128
118129 static ExitOnError ExitOnErr;
119130