[llvm] r328305 - [llvm-mca] Add flag -resource-pressure to enable/disable printing of the resource pressure view.

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 23 04:33:09 PDT 2018


Author: adibiagio
Date: Fri Mar 23 04:33:09 2018
New Revision: 328305

URL: http://llvm.org/viewvc/llvm-project?rev=328305&view=rev
Log:
[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.

Modified:
    llvm/trunk/tools/llvm-mca/llvm-mca.cpp

Modified: llvm/trunk/tools/llvm-mca/llvm-mca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/llvm-mca.cpp?rev=328305&r1=328304&r2=328305&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/llvm-mca.cpp (original)
+++ llvm/trunk/tools/llvm-mca/llvm-mca.cpp Fri Mar 23 04:33:09 2018
@@ -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>(




More information about the llvm-commits mailing list