diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-03-26 13:44:54 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-03-26 13:44:54 +0000 |
commit | ff9c1092b708d39f9dc99855f31d75b50c809c63 (patch) | |
tree | 70a75b7698a3e3cbde7061fef1901dbd7ccd8d6c /llvm/tools/llvm-mca/llvm-mca.cpp | |
parent | 1feccc24817d7317b94a7e51398c996cdf844229 (diff) | |
download | bcm5719-llvm-ff9c1092b708d39f9dc99855f31d75b50c809c63.tar.gz bcm5719-llvm-ff9c1092b708d39f9dc99855f31d75b50c809c63.zip |
[llvm-mca] Add a flag -instruction-info to enable/disable the instruction info view.
llvm-svn: 328493
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
-rw-r--r-- | llvm/tools/llvm-mca/llvm-mca.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index 127b22f67f4..cae4c2741b1 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -131,6 +131,11 @@ static cl::opt<bool> cl::desc("Print instruction tables"), cl::init(false)); +static cl::opt<bool> + PrintInstructionInfoView("instruction-info", + cl::desc("Print the instruction info view"), + cl::init(true)); + static const Target *getTarget(const char *ProgName) { TripleName = Triple::normalize(TripleName); if (TripleName.empty()) @@ -336,9 +341,13 @@ int main(int argc, char **argv) { if (PrintInstructionTables) { mca::InstructionTables IT(STI->getSchedModel(), *IB, *S); + + if (PrintInstructionInfoView) { + mca::InstructionInfoView IIV(*STI, *MCII, *S, *IP); + IT.addEventListener(&IIV); + } + mca::ResourcePressureView RPV(*STI, *IP, *S); - mca::InstructionInfoView IIV(*STI, *MCII, *S, *IP); - IT.addEventListener(&IIV); IT.addEventListener(&RPV); IT.run(); RPV.printView(TOF->os()); @@ -355,8 +364,9 @@ int main(int argc, char **argv) { Printer->addView(llvm::make_unique<mca::SummaryView>(*S, Width)); - Printer->addView( - llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, *S, *IP)); + if (PrintInstructionInfoView) + Printer->addView( + llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, *S, *IP)); if (PrintModeVerbose) Printer->addView(llvm::make_unique<mca::BackendStatistics>(*STI)); |