summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/ResourcePressureView.h
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-08 16:08:43 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-08 16:08:43 +0000
commit8af3fe81eb94e71c4921ac246feaa76c47ecbf39 (patch)
tree7284415a8ba7bdbcfd4eb4c8c2584e9b74ca2fa4 /llvm/tools/llvm-mca/ResourcePressureView.h
parentb312b1396069203bb1cfd64a5c4c903b05d3cd6a (diff)
downloadbcm5719-llvm-8af3fe81eb94e71c4921ac246feaa76c47ecbf39.tar.gz
bcm5719-llvm-8af3fe81eb94e71c4921ac246feaa76c47ecbf39.zip
[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
Diffstat (limited to 'llvm/tools/llvm-mca/ResourcePressureView.h')
-rw-r--r--llvm/tools/llvm-mca/ResourcePressureView.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mca/ResourcePressureView.h b/llvm/tools/llvm-mca/ResourcePressureView.h
index 7017f0b6eb3..ad8c1b7d4c0 100644
--- a/llvm/tools/llvm-mca/ResourcePressureView.h
+++ b/llvm/tools/llvm-mca/ResourcePressureView.h
@@ -58,7 +58,7 @@
#ifndef LLVM_TOOLS_LLVM_MCA_RESOURCEPRESSUREVIEW_H
#define LLVM_TOOLS_LLVM_MCA_RESOURCEPRESSUREVIEW_H
-#include "HWEventListener.h"
+#include "View.h"
#include "SourceMgr.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCSubtargetInfo.h"
@@ -70,7 +70,7 @@ class Backend;
/// This class collects resource pressure statistics and it is able to print
/// out all the collected information as a table to an output stream.
-class ResourcePressureView : public HWEventListener {
+class ResourcePressureView : public View {
const llvm::MCSubtargetInfo &STI;
llvm::MCInstPrinter &MCIP;
const SourceMgr &Source;
@@ -101,7 +101,7 @@ public:
unsigned Index,
const llvm::ArrayRef<std::pair<ResourceRef, unsigned>> &Used) override;
- void printResourcePressure(llvm::raw_ostream &OS, unsigned Cycles) const {
+ void printView(llvm::raw_ostream &OS) const {
unsigned Executions = Source.getNumIterations();
printResourcePressurePerIteration(OS, Executions);
printResourcePressurePerInstruction(OS, Executions);
OpenPOWER on IntegriCloud