From 534e1dab7984cab91b341deaa409c73f354dd2b7 Mon Sep 17 00:00:00 2001 From: Andrea Di Biagio Date: Wed, 25 Apr 2018 11:33:14 +0000 Subject: [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= - Maximum number of cycles in the timeline view. Defaults to 80 cycles -timeline-max-iterations= - Maximum number of iterations to print in timeline view ``` llvm-svn: 330816 --- llvm/tools/llvm-mca/llvm-mca.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp') 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 InputFilename(cl::Positional, cl::desc(""), cl::init("-")); @@ -95,39 +97,47 @@ static cl::opt static cl::opt PrintRegisterFileStats("register-file-stats", cl::desc("Print register file statistics"), + cl::cat(ViewOptions), cl::init(false)); static cl::opt PrintDispatchStats("dispatch-stats", cl::desc("Print dispatch statistics"), + cl::cat(ViewOptions), cl::init(false)); static cl::opt PrintSchedulerStats("scheduler-stats", cl::desc("Print scheduler statistics"), + cl::cat(ViewOptions), cl::init(false)); static cl::opt PrintRetireStats("retire-stats", cl::desc("Print retire control unit statistics"), + cl::cat(ViewOptions), cl::init(false)); static cl::opt PrintResourcePressureView("resource-pressure", cl::desc("Print the resource pressure view"), + cl::cat(ViewOptions), cl::init(true)); static cl::opt PrintTimelineView("timeline", cl::desc("Print the timeline view"), + cl::cat(ViewOptions), cl::init(false)); static cl::opt TimelineMaxIterations( "timeline-max-iterations", cl::desc("Maximum number of iterations to print in timeline view"), + cl::cat(ViewOptions), cl::init(0)); static cl::opt 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 AssumeNoAlias( @@ -144,11 +154,13 @@ static cl::opt static cl::opt PrintInstructionTables("instruction-tables", cl::desc("Print instruction tables"), + cl::cat(ViewOptions), cl::init(false)); static cl::opt PrintInstructionInfoView("instruction-info", cl::desc("Print the instruction info view"), + cl::cat(ViewOptions), cl::init(true)); namespace { -- cgit v1.2.3