summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/llvm-mca.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-23 11:33:09 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-23 11:33:09 +0000
commit29538c6ddbdc74889d2f76bb4f710782e39989b3 (patch)
treec5928521fd958f6bad16177fce988f4510fcfa09 /llvm/tools/llvm-mca/llvm-mca.cpp
parenta1e3ea01ef8d901962527b0718763e4613276e42 (diff)
downloadbcm5719-llvm-29538c6ddbdc74889d2f76bb4f710782e39989b3.tar.gz
bcm5719-llvm-29538c6ddbdc74889d2f76bb4f710782e39989b3.zip
[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
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
-rw-r--r--llvm/tools/llvm-mca/llvm-mca.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index e9248f15442..0ae9c8849bb 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -89,6 +89,11 @@ static cl::opt<unsigned>
"be used for register mappings"),
cl::init(0));
+static cl::opt<bool>
+ PrintResourcePressureView("resource-pressure",
+ cl::desc("Print the resource pressure view"),
+ cl::init(true));
+
static cl::opt<bool> 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<mca::BackendStatistics>(*STI));
- Printer->addView(llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, *S));
+ if (PrintResourcePressureView)
+ Printer->addView(llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, *S));
if (PrintTimelineView) {
Printer->addView(llvm::make_unique<mca::TimelineView>(
OpenPOWER on IntegriCloud