mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[llvm-mca] Run clang-format on the source code. NFC
llvm-svn: 327125
This commit is contained in:
parent
33d8a7c561
commit
9d4e3cac5b
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user