diff options
Diffstat (limited to 'llvm/tools/llvm-mca')
-rw-r--r-- | llvm/tools/llvm-mca/BackendStatistics.cpp | 26 | ||||
-rw-r--r-- | llvm/tools/llvm-mca/BackendStatistics.h | 7 | ||||
-rw-r--r-- | llvm/tools/llvm-mca/ResourcePressureView.h | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-mca/TimelineView.cpp | 6 | ||||
-rw-r--r-- | llvm/tools/llvm-mca/TimelineView.h | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-mca/llvm-mca.cpp | 9 |
6 files changed, 28 insertions, 24 deletions
diff --git a/llvm/tools/llvm-mca/BackendStatistics.cpp b/llvm/tools/llvm-mca/BackendStatistics.cpp index b3532c72ee9..358ce280886 100644 --- a/llvm/tools/llvm-mca/BackendStatistics.cpp +++ b/llvm/tools/llvm-mca/BackendStatistics.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// /// \file -/// +/// /// Functionalities used by the BackendPrinter to print out histograms /// related to number of {dispatch/issue/retire} per number of cycles. /// @@ -42,7 +42,8 @@ void BackendStatistics::printRetireUnitStatistics(llvm::raw_ostream &OS) const { OS << Buffer; } -void BackendStatistics::printDispatchUnitStatistics(llvm::raw_ostream &OS) const { +void BackendStatistics::printDispatchUnitStatistics( + llvm::raw_ostream &OS) const { std::string Buffer; raw_string_ostream TempStream(Buffer); TempStream << "\n\nDispatch Logic - " @@ -76,8 +77,8 @@ void BackendStatistics::printSchedulerStatistics(llvm::raw_ostream &OS) const { } void BackendStatistics::printRATStatistics(raw_ostream &OS, - unsigned TotalMappings, - unsigned MaxUsedMappings) const { + unsigned TotalMappings, + unsigned MaxUsedMappings) const { std::string Buffer; raw_string_ostream TempStream(Buffer); TempStream << "\n\nRegister Alias Table:"; @@ -88,11 +89,12 @@ void BackendStatistics::printRATStatistics(raw_ostream &OS, OS << Buffer; } -void BackendStatistics::printDispatchStalls(raw_ostream &OS, - unsigned RATStalls, unsigned RCUStalls, - unsigned SCHEDQStalls, - unsigned LDQStalls, unsigned STQStalls, - unsigned DGStalls) const { +void BackendStatistics::printDispatchStalls(raw_ostream &OS, unsigned RATStalls, + unsigned RCUStalls, + unsigned SCHEDQStalls, + unsigned LDQStalls, + unsigned STQStalls, + unsigned DGStalls) const { std::string Buffer; raw_string_ostream TempStream(Buffer); TempStream << "\n\nDynamic Dispatch Stall Cycles:\n"; @@ -113,8 +115,9 @@ void BackendStatistics::printDispatchStalls(raw_ostream &OS, OS << Buffer; } -void BackendStatistics::printSchedulerUsage(raw_ostream &OS, - const MCSchedModel &SM, const ArrayRef<BufferUsageEntry> &Usage) const { +void BackendStatistics::printSchedulerUsage( + raw_ostream &OS, const MCSchedModel &SM, + const ArrayRef<BufferUsageEntry> &Usage) const { std::string Buffer; raw_string_ostream TempStream(Buffer); TempStream << "\n\nScheduler's queue usage:\n"; @@ -135,4 +138,3 @@ void BackendStatistics::printSchedulerUsage(raw_ostream &OS, } } // namespace mca - diff --git a/llvm/tools/llvm-mca/BackendStatistics.h b/llvm/tools/llvm-mca/BackendStatistics.h index 7d79d2465d2..f5363bdfb2d 100644 --- a/llvm/tools/llvm-mca/BackendStatistics.h +++ b/llvm/tools/llvm-mca/BackendStatistics.h @@ -124,10 +124,11 @@ public: void onCycleEnd(unsigned Cycle) override { updateHistograms(); } void printView(llvm::raw_ostream &OS) const override { - printDispatchStalls(OS, B.getNumRATStalls(), B.getNumRCUStalls(), B.getNumSQStalls(), - B.getNumLDQStalls(), B.getNumSTQStalls(), B.getNumDispatchGroupStalls()); + printDispatchStalls(OS, B.getNumRATStalls(), B.getNumRCUStalls(), + B.getNumSQStalls(), B.getNumLDQStalls(), + B.getNumSTQStalls(), B.getNumDispatchGroupStalls()); printRATStatistics(OS, B.getTotalRegisterMappingsCreated(), - B.getMaxUsedRegisterMappings()); + B.getMaxUsedRegisterMappings()); printDispatchUnitStatistics(OS); printSchedulerStatistics(OS); printRetireUnitStatistics(OS); diff --git a/llvm/tools/llvm-mca/ResourcePressureView.h b/llvm/tools/llvm-mca/ResourcePressureView.h index 3521d02b9ad..77c07be10dc 100644 --- a/llvm/tools/llvm-mca/ResourcePressureView.h +++ b/llvm/tools/llvm-mca/ResourcePressureView.h @@ -58,8 +58,8 @@ #ifndef LLVM_TOOLS_LLVM_MCA_RESOURCEPRESSUREVIEW_H #define LLVM_TOOLS_LLVM_MCA_RESOURCEPRESSUREVIEW_H -#include "View.h" #include "SourceMgr.h" +#include "View.h" #include "llvm/MC/MCInstPrinter.h" #include "llvm/MC/MCSubtargetInfo.h" #include <map> diff --git a/llvm/tools/llvm-mca/TimelineView.cpp b/llvm/tools/llvm-mca/TimelineView.cpp index 50d6ebe2288..dd44bccf28b 100644 --- a/llvm/tools/llvm-mca/TimelineView.cpp +++ b/llvm/tools/llvm-mca/TimelineView.cpp @@ -175,14 +175,16 @@ void TimelineView::printTimelineViewEntry(raw_string_ostream &OS, if (Entry.CycleDispatched != Entry.CycleExecuted) { // Zero latency instructions have the same value for CycleDispatched, // CycleIssued and CycleExecuted. - for (unsigned I = Entry.CycleDispatched + 1, E = Entry.CycleIssued; I < E; ++I) + for (unsigned I = Entry.CycleDispatched + 1, E = Entry.CycleIssued; I < E; + ++I) OS << '='; if (Entry.CycleIssued == Entry.CycleExecuted) OS << 'E'; else { if (Entry.CycleDispatched != Entry.CycleIssued) OS << 'e'; - for (unsigned I = Entry.CycleIssued + 1, E = Entry.CycleExecuted; I < E; ++I) + for (unsigned I = Entry.CycleIssued + 1, E = Entry.CycleExecuted; I < E; + ++I) OS << 'e'; OS << 'E'; } diff --git a/llvm/tools/llvm-mca/TimelineView.h b/llvm/tools/llvm-mca/TimelineView.h index 9ce2804496f..e6ee79b8fcc 100644 --- a/llvm/tools/llvm-mca/TimelineView.h +++ b/llvm/tools/llvm-mca/TimelineView.h @@ -100,8 +100,8 @@ #ifndef LLVM_TOOLS_LLVM_MCA_TIMELINEVIEW_H #define LLVM_TOOLS_LLVM_MCA_TIMELINEVIEW_H -#include "View.h" #include "SourceMgr.h" +#include "View.h" #include "llvm/MC/MCInstPrinter.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/Support/raw_ostream.h" diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index d7ffb2fdffd..efc20e926b7 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -21,6 +21,10 @@ // //===----------------------------------------------------------------------===// +#include "BackendPrinter.h" +#include "BackendStatistics.h" +#include "ResourcePressureView.h" +#include "TimelineView.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCObjectFileInfo.h" @@ -37,11 +41,6 @@ #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Support/ToolOutputFile.h" -#include "BackendPrinter.h" -#include "BackendStatistics.h" -#include "ResourcePressureView.h" -#include "TimelineView.h" - using namespace llvm; |