diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 19:31:46 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 19:37:19 +0000 |
commit | e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 (patch) | |
tree | 94f04805f47bb7c59ae29690d8952b6074fff602 /contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h | |
parent | bb130ff39747b94592cb26d71b7cb097b9a4ea6b (diff) | |
parent | b60736ec1405bb0a8dd40989f67ef4c93da068ab (diff) | |
download | src-e8d8bef961a50d4dc22501cde4fb9fb0be1b2532.tar.gz src-e8d8bef961a50d4dc22501cde4fb9fb0be1b2532.zip |
Diffstat (limited to 'contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h')
-rw-r--r-- | contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h b/contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h index 9be31b7d51bd..2622e869ef23 100644 --- a/contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h +++ b/contrib/llvm-project/llvm/tools/llvm-mca/Views/SummaryView.h @@ -46,6 +46,18 @@ class SummaryView : public View { // The total number of micro opcodes contributed by a block of instructions. unsigned NumMicroOps; + struct DisplayValues { + unsigned Instructions; + unsigned Iterations; + unsigned TotalInstructions; + unsigned TotalCycles; + unsigned DispatchWidth; + unsigned TotalUOps; + double IPC; + double UOpsPerCycle; + double BlockRThroughput; + }; + // For each processor resource, this vector stores the cumulative number of // resource cycles consumed by the analyzed code block. llvm::SmallVector<unsigned, 8> ProcResourceUsage; @@ -65,6 +77,9 @@ class SummaryView : public View { // - Total Resource Cycles / #Units (for every resource consumed). double getBlockRThroughput() const; + /// Compute the data we want to print out in the object DV. + void collectData(DisplayValues &DV) const; + public: SummaryView(const llvm::MCSchedModel &Model, llvm::ArrayRef<llvm::MCInst> S, unsigned Width); @@ -72,8 +87,9 @@ public: void onCycleEnd() override { ++TotalCycles; } void onEvent(const HWInstructionEvent &Event) override; void printView(llvm::raw_ostream &OS) const override; + StringRef getNameAsString() const override { return "SummaryView"; } + json::Value toJSON() const override; }; - } // namespace mca } // namespace llvm |