From 29538c6ddbdc74889d2f76bb4f710782e39989b3 Mon Sep 17 00:00:00 2001 From: Andrea Di Biagio Date: Fri, 23 Mar 2018 11:33:09 +0000 Subject: [PATCH] [llvm-mca] Add flag -resource-pressure to enable/disable printing of the resource pressure view. By default, the tool always enables the resource pressure view. This flag lets user specify whether they want to add that view or not. llvm-svn: 328305 --- llvm/tools/llvm-mca/llvm-mca.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index e9248f154429..0ae9c8849bbb 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -89,6 +89,11 @@ static cl::opt "be used for register mappings"), cl::init(0)); +static cl::opt + PrintResourcePressureView("resource-pressure", + cl::desc("Print the resource pressure view"), + cl::init(true)); + static cl::opt PrintTimelineView("timeline", cl::desc("Print the timeline view"), cl::init(false)); @@ -329,7 +334,8 @@ int main(int argc, char **argv) { if (PrintModeVerbose) Printer->addView(llvm::make_unique(*STI)); - Printer->addView(llvm::make_unique(*STI, *IP, *S)); + if (PrintResourcePressureView) + Printer->addView(llvm::make_unique(*STI, *IP, *S)); if (PrintTimelineView) { Printer->addView(llvm::make_unique(