[llvm-mca] Unify the API for the various views. NFCI
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 8 Mar 2018 16:08:43 +0000 (16:08 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 8 Mar 2018 16:08:43 +0000 (16:08 +0000)
commit8af3fe81eb94e71c4921ac246feaa76c47ecbf39
tree7284415a8ba7bdbcfd4eb4c8c2584e9b74ca2fa4
parentb312b1396069203bb1cfd64a5c4c903b05d3cd6a
[llvm-mca] Unify the API for the various views. NFCI

This allows the customization of the performance report.

Users can specify their own custom sequence of views.
Each view contributes a portion of the performance report generated by the
BackendPrinter.

Internally, class BackendPrinter keeps a sequence of views; views are printed
out in sequence when method 'printReport()' is called.

This patch addresses one of the two review comments from Clement in D43951.

llvm-svn: 327018
13 files changed:
llvm/tools/llvm-mca/Backend.cpp
llvm/tools/llvm-mca/Backend.h
llvm/tools/llvm-mca/BackendPrinter.cpp
llvm/tools/llvm-mca/BackendPrinter.h
llvm/tools/llvm-mca/BackendStatistics.cpp
llvm/tools/llvm-mca/BackendStatistics.h
llvm/tools/llvm-mca/CMakeLists.txt
llvm/tools/llvm-mca/HWEventListener.h
llvm/tools/llvm-mca/ResourcePressureView.h
llvm/tools/llvm-mca/TimelineView.h
llvm/tools/llvm-mca/View.cpp [new file with mode: 0644]
llvm/tools/llvm-mca/View.h [new file with mode: 0644]
llvm/tools/llvm-mca/llvm-mca.cpp