diff options
| author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-04-03 16:46:23 +0000 |
|---|---|---|
| committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-04-03 16:46:23 +0000 |
| commit | 8dabf4f145de4135b4c4af89f9017830bbba0dea (patch) | |
| tree | 9b3d7d1db12a0fefb70046fd306dc4cb5d51179e /llvm/tools/llvm-mca/llvm-mca.cpp | |
| parent | df989c54cfeb5827619904f5e71511b7d48d157f (diff) | |
| download | bcm5719-llvm-8dabf4f145de4135b4c4af89f9017830bbba0dea.tar.gz bcm5719-llvm-8dabf4f145de4135b4c4af89f9017830bbba0dea.zip | |
[llvm-mca] Move the logic that prints register file statistics to its own view. NFCI
Before this patch, the "BackendStatistics" view was responsible for printing the
register file usage (as well as many other statistics).
Now users can enable register file usage statistics using the command line flag
`-register-file-stats`. By default, the tool doesn't print register file
statistics.
llvm-svn: 329083
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
| -rw-r--r-- | llvm/tools/llvm-mca/llvm-mca.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index 49d50476354..7ad31df3ce8 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -25,6 +25,7 @@ #include "BackendStatistics.h" #include "InstructionInfoView.h" #include "InstructionTables.h" +#include "RegisterFileStatistics.h" #include "ResourcePressureView.h" #include "SummaryView.h" #include "TimelineView.h" @@ -92,6 +93,11 @@ static cl::opt<unsigned> cl::init(0)); static cl::opt<bool> + PrintRegisterFileStats("register-file-stats", + cl::desc("Print register file statistics"), + cl::init(false)); + +static cl::opt<bool> PrintResourcePressureView("resource-pressure", cl::desc("Print the resource pressure view"), cl::init(true)); @@ -370,6 +376,9 @@ int main(int argc, char **argv) { if (PrintModeVerbose) Printer->addView(llvm::make_unique<mca::BackendStatistics>(*STI)); + if (PrintRegisterFileStats) + Printer->addView(llvm::make_unique<mca::RegisterFileStatistics>(*STI)); + if (PrintResourcePressureView) Printer->addView( llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, *S)); |

