Skip to content

Commit c039376

Browse files
committed
fixup! Use a shorter flag name
1 parent 619a4c3 commit c039376

File tree

4 files changed

+25
-17
lines changed

4 files changed

+25
-17
lines changed

llvm/docs/CommandGuide/llvm-exegesis.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,25 @@ OPTIONS
299299
However, it is possible to stop at some stage before measuring. Choices are:
300300
* ``prepare-snippet``: Only generate the minimal instruction sequence.
301301
* ``prepare-and-assemble-snippet``: Same as ``prepare-snippet``, but also dumps an excerpt of the sequence (hex encoded).
302-
* ``assemble-measured-code``: Same as ``prepare-and-assemble-snippet``. but
303-
also creates the full sequence that can be dumped to a file using ``--dump-object-to-disk``.
304-
If either zlib or zstd is available and we're using either duplicate or
305-
loop repetition mode, this phase generates benchmarks with a serialized
306-
snippet object file attached to it.
302+
* ``assemble-measured-code``: Same as ``prepare-and-assemble-snippet``. but also creates the full sequence that can be dumped to a file using ``--dump-object-to-disk``.
307303
* ``measure``: Same as ``assemble-measured-code``, but also runs the measurement.
308304
* ``dry-run-measurement``: Same as measure, but does not actually execute the snippet.
309305

306+
.. option:: --serialize-benchmarks
307+
308+
Generate a fully serialized benchmarks file, including the assembled object
309+
files. This is useful to resume the measurement later with ``--run-measurement``.
310+
311+
.. option:: --force-serialized-obj-compress-format=[zlib|zstd]
312+
313+
When serializing benchmarks with ``--serialize-benchmarks``, always use the
314+
compression format designated by this flag.
315+
310316
.. option:: --run-measurement=<benchmarks file>
311317

312-
Given a benchmarks file generated after the ``assembly-measured-code`` phase,
313-
resume the measurement phase from it.
318+
Given a fully serialized benchmarks file generated after the
319+
``assembly-measured-code`` phase with ``--serialize-benchmarks``, resume the
320+
measurement phase from it.
314321

315322
.. option:: --x86-lbr-sample-period=<nBranches/sample>
316323

llvm/test/tools/llvm-exegesis/serialize-obj-file.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --exegesis-serialize-benchmarks --benchmark-phase=assemble-measured-code \
1+
# RUN: llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --serialize-benchmarks --benchmark-phase=assemble-measured-code \
22
# RUN: --mode=latency --benchmarks-file=%t.yaml
33
# RUN: FileCheck --input-file=%t.yaml %s --check-prefixes=CHECK,SERIALIZE
44
# RUN: llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --run-measurement=%t.yaml --mode=latency --benchmark-phase=dry-run-measurement --use-dummy-perf-counters \
@@ -10,11 +10,11 @@
1010
# RUN: FileCheck %s --check-prefix=NO-SERIALIZE
1111

1212
# We currently don't support serialization for repetition modes that require more than one snippets.
13-
# RUN: not llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --mode=latency --exegesis-serialize-benchmarks --benchmark-phase=assemble-measured-code \
13+
# RUN: not llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --mode=latency --serialize-benchmarks --benchmark-phase=assemble-measured-code \
1414
# RUN: --repetition-mode=min 2>&1 | FileCheck %s --check-prefix=NOT-SUPPORTED
15-
# RUN: not llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --mode=latency --exegesis-serialize-benchmarks --benchmark-phase=assemble-measured-code \
15+
# RUN: not llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --mode=latency --serialize-benchmarks --benchmark-phase=assemble-measured-code \
1616
# RUN: --repetition-mode=middle-half-loop 2>&1 | FileCheck %s --check-prefix=NOT-SUPPORTED
17-
# RUN: not llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --mode=latency --exegesis-serialize-benchmarks --benchmark-phase=assemble-measured-code \
17+
# RUN: not llvm-exegesis -mtriple=riscv64 -mcpu=sifive-p470 --opcode-name=SH3ADD --mode=latency --serialize-benchmarks --benchmark-phase=assemble-measured-code \
1818
# RUN: --repetition-mode=middle-half-duplicate 2>&1 | FileCheck %s --check-prefix=NOT-SUPPORTED
1919

2020
# REQUIRES: riscv-registered-target && native-registered-exegesis-target
@@ -37,5 +37,5 @@
3737

3838
# Negative tests.
3939

40-
# NOT-SUPPORTED: -exegesis-serialize-benchmarks currently only supports -repetition-mode of loop and duplicate.
40+
# NOT-SUPPORTED: -serialize-benchmarks currently only supports -repetition-mode of loop and duplicate.
4141
# NO-SERIALIZE-NOT: object_file:

llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ static constexpr const char kInvalidOperand[] = "INVALID";
3131
namespace llvm {
3232

3333
static cl::opt<compression::Format> ForceObjectFileCompressionFormat(
34-
"exegesis-force-obj-compress-format", cl::Hidden,
35-
cl::desc("Force to use this compression format for object files."),
34+
"force-serialized-obj-compress-format", cl::Hidden,
35+
cl::desc(
36+
"Force to use this compression format for serialized object files."),
3637
cl::values(clEnumValN(compression::Format::Zstd, "zstd", "Using Zstandard"),
3738
clEnumValN(compression::Format::Zlib, "zlib", "Using LibZ")));
3839

llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
namespace llvm {
5555

5656
static cl::opt<bool>
57-
SerializeBenchmarks("exegesis-serialize-benchmarks",
57+
SerializeBenchmarks("serialize-benchmarks",
5858
cl::desc("Generate fully-serialized benchmarks "
5959
"that can later be deserialized and "
6060
"resuming the measurement."),
@@ -679,8 +679,8 @@ BenchmarkRunner::getRunnableConfiguration(
679679
if (RepetitionMode != Benchmark::Loop &&
680680
RepetitionMode != Benchmark::Duplicate)
681681
return make_error<Failure>(
682-
"-exegesis-serialize-benchmarks currently "
683-
"only supports -repetition-mode of loop and duplicate.");
682+
"-serialize-benchmarks currently only supports -repetition-mode "
683+
"of loop and duplicate.");
684684

685685
if (Error E = BenchmarkResult.setObjectFile(*Snippet))
686686
return std::move(E);

0 commit comments

Comments
 (0)