summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/llvm-mca.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-04-25 11:33:14 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-04-25 11:33:14 +0000
commit534e1dab7984cab91b341deaa409c73f354dd2b7 (patch)
tree27a7aecb84fc3ee04f3ab57389d08b4a10b0718b /llvm/tools/llvm-mca/llvm-mca.cpp
parent03e85e126c608b023c8e9825aa0495ff24907ac4 (diff)
downloadbcm5719-llvm-534e1dab7984cab91b341deaa409c73f354dd2b7.tar.gz
bcm5719-llvm-534e1dab7984cab91b341deaa409c73f354dd2b7.zip
[llvm-mca] Add a new option category for views.
With this patch, options to add/tweak views are all grouped together in the -help output. The new "View Options" category looks like this: ``` View Options: -dispatch-stats - Print dispatch statistics -instruction-info - Print the instruction info view -instruction-tables - Print instruction tables -register-file-stats - Print register file statistics -resource-pressure - Print the resource pressure view -retire-stats - Print retire control unit statistics -scheduler-stats - Print scheduler statistics -timeline - Print the timeline view -timeline-max-cycles=<uint> - Maximum number of cycles in the timeline view. Defaults to 80 cycles -timeline-max-iterations=<uint> - Maximum number of iterations to print in timeline view ``` llvm-svn: 330816
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
-rw-r--r--llvm/tools/llvm-mca/llvm-mca.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index d0f942a6dde..73d4d8efb25 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -52,6 +52,8 @@
using namespace llvm;
+llvm::cl::OptionCategory ViewOptions("View Options");
+
static cl::opt<std::string>
InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
@@ -95,39 +97,47 @@ static cl::opt<unsigned>
static cl::opt<bool>
PrintRegisterFileStats("register-file-stats",
cl::desc("Print register file statistics"),
+ cl::cat(ViewOptions),
cl::init(false));
static cl::opt<bool> PrintDispatchStats("dispatch-stats",
cl::desc("Print dispatch statistics"),
+ cl::cat(ViewOptions),
cl::init(false));
static cl::opt<bool> PrintSchedulerStats("scheduler-stats",
cl::desc("Print scheduler statistics"),
+ cl::cat(ViewOptions),
cl::init(false));
static cl::opt<bool>
PrintRetireStats("retire-stats",
cl::desc("Print retire control unit statistics"),
+ cl::cat(ViewOptions),
cl::init(false));
static cl::opt<bool>
PrintResourcePressureView("resource-pressure",
cl::desc("Print the resource pressure view"),
+ cl::cat(ViewOptions),
cl::init(true));
static cl::opt<bool> PrintTimelineView("timeline",
cl::desc("Print the timeline view"),
+ cl::cat(ViewOptions),
cl::init(false));
static cl::opt<unsigned> TimelineMaxIterations(
"timeline-max-iterations",
cl::desc("Maximum number of iterations to print in timeline view"),
+ cl::cat(ViewOptions),
cl::init(0));
static cl::opt<unsigned> TimelineMaxCycles(
"timeline-max-cycles",
cl::desc(
"Maximum number of cycles in the timeline view. Defaults to 80 cycles"),
+ cl::cat(ViewOptions),
cl::init(80));
static cl::opt<bool> AssumeNoAlias(
@@ -144,11 +154,13 @@ static cl::opt<unsigned>
static cl::opt<bool>
PrintInstructionTables("instruction-tables",
cl::desc("Print instruction tables"),
+ cl::cat(ViewOptions),
cl::init(false));
static cl::opt<bool>
PrintInstructionInfoView("instruction-info",
cl::desc("Print the instruction info view"),
+ cl::cat(ViewOptions),
cl::init(true));
namespace {
OpenPOWER on IntegriCloud