[PATCH] D140702: [exegesis] "Skip codegen" dry-run mode
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 07:33:32 PST 2023
gchatelet added inline comments.
================
Comment at: llvm/docs/CommandGuide/llvm-exegesis.rst:199-207
+.. option:: --benchmark-phase=[skip-codegen|skip-full-codegen|skip-measurements|measure]
By default, when `-mode=` is specified, the generated snippet will be executed
and measured, and that requires that we are running on the hardware for which
the snippet was generated, and that supports performance measurements.
But sometimes, you just want to generate snippets, and this is exactly what
+ this options allows one to do. It's possible to also skip target machine code
----------------
I'm confused by this documentation.
Can we list the options and describe what they mean exactly?
What is the difference between `skip-codegen` and `skip-full-codegen`?
What are the outputs for the different stages?
Maybe name the options according to what they do instead of what it doesn't do.
================
Comment at: llvm/tools/llvm-exegesis/llvm-exegesis.cpp:125-141
+ clEnumValN(exegesis::BenchmarkPhaseSelectorE::StopBeforeAllCodegen,
+ "skip-codegen",
+ "come up with the instruction sequence that can be "
+ "assembled into a runnable snippet to measure the "
+ "characteristic, but stop after that"),
+ clEnumValN(exegesis::BenchmarkPhaseSelectorE::StopBeforeFullCodegen,
+ "skip-full-codegen",
----------------
It seems better to use more descriptive flags:
1. Only generate the minimal instruction sequence
2. Same as 1. but also dumps an excerpt of the sequence (hex encoded)
3. Same as 2. but also creates the full sequence that can be dumped to a file using `--dump-object-to-disk`
4. Same as 3. but also runs the measurement.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140702/new/
https://reviews.llvm.org/D140702
More information about the llvm-commits
mailing list