Skip to content
This repository was archived by the owner on Jan 1, 2023. It is now read-only.

Commit e9b1df3

Browse files
committed
[llvm-mca] Run clang-format on the source code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327125 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent db875d5 commit e9b1df3

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

tools/llvm-mca/BackendStatistics.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99
/// \file
10-
///
10+
///
1111
/// Functionalities used by the BackendPrinter to print out histograms
1212
/// related to number of {dispatch/issue/retire} per number of cycles.
1313
///
@@ -42,7 +42,8 @@ void BackendStatistics::printRetireUnitStatistics(llvm::raw_ostream &OS) const {
4242
OS << Buffer;
4343
}
4444

45-
void BackendStatistics::printDispatchUnitStatistics(llvm::raw_ostream &OS) const {
45+
void BackendStatistics::printDispatchUnitStatistics(
46+
llvm::raw_ostream &OS) const {
4647
std::string Buffer;
4748
raw_string_ostream TempStream(Buffer);
4849
TempStream << "\n\nDispatch Logic - "
@@ -76,8 +77,8 @@ void BackendStatistics::printSchedulerStatistics(llvm::raw_ostream &OS) const {
7677
}
7778

7879
void BackendStatistics::printRATStatistics(raw_ostream &OS,
79-
unsigned TotalMappings,
80-
unsigned MaxUsedMappings) const {
80+
unsigned TotalMappings,
81+
unsigned MaxUsedMappings) const {
8182
std::string Buffer;
8283
raw_string_ostream TempStream(Buffer);
8384
TempStream << "\n\nRegister Alias Table:";
@@ -88,11 +89,12 @@ void BackendStatistics::printRATStatistics(raw_ostream &OS,
8889
OS << Buffer;
8990
}
9091

91-
void BackendStatistics::printDispatchStalls(raw_ostream &OS,
92-
unsigned RATStalls, unsigned RCUStalls,
93-
unsigned SCHEDQStalls,
94-
unsigned LDQStalls, unsigned STQStalls,
95-
unsigned DGStalls) const {
92+
void BackendStatistics::printDispatchStalls(raw_ostream &OS, unsigned RATStalls,
93+
unsigned RCUStalls,
94+
unsigned SCHEDQStalls,
95+
unsigned LDQStalls,
96+
unsigned STQStalls,
97+
unsigned DGStalls) const {
9698
std::string Buffer;
9799
raw_string_ostream TempStream(Buffer);
98100
TempStream << "\n\nDynamic Dispatch Stall Cycles:\n";
@@ -113,8 +115,9 @@ void BackendStatistics::printDispatchStalls(raw_ostream &OS,
113115
OS << Buffer;
114116
}
115117

116-
void BackendStatistics::printSchedulerUsage(raw_ostream &OS,
117-
const MCSchedModel &SM, const ArrayRef<BufferUsageEntry> &Usage) const {
118+
void BackendStatistics::printSchedulerUsage(
119+
raw_ostream &OS, const MCSchedModel &SM,
120+
const ArrayRef<BufferUsageEntry> &Usage) const {
118121
std::string Buffer;
119122
raw_string_ostream TempStream(Buffer);
120123
TempStream << "\n\nScheduler's queue usage:\n";
@@ -135,4 +138,3 @@ void BackendStatistics::printSchedulerUsage(raw_ostream &OS,
135138
}
136139

137140
} // namespace mca
138-

tools/llvm-mca/BackendStatistics.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ class BackendStatistics : public View {
124124
void onCycleEnd(unsigned Cycle) override { updateHistograms(); }
125125

126126
void printView(llvm::raw_ostream &OS) const override {
127-
printDispatchStalls(OS, B.getNumRATStalls(), B.getNumRCUStalls(), B.getNumSQStalls(),
128-
B.getNumLDQStalls(), B.getNumSTQStalls(), B.getNumDispatchGroupStalls());
127+
printDispatchStalls(OS, B.getNumRATStalls(), B.getNumRCUStalls(),
128+
B.getNumSQStalls(), B.getNumLDQStalls(),
129+
B.getNumSTQStalls(), B.getNumDispatchGroupStalls());
129130
printRATStatistics(OS, B.getTotalRegisterMappingsCreated(),
130-
B.getMaxUsedRegisterMappings());
131+
B.getMaxUsedRegisterMappings());
131132
printDispatchUnitStatistics(OS);
132133
printSchedulerStatistics(OS);
133134
printRetireUnitStatistics(OS);

tools/llvm-mca/ResourcePressureView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
#ifndef LLVM_TOOLS_LLVM_MCA_RESOURCEPRESSUREVIEW_H
5959
#define LLVM_TOOLS_LLVM_MCA_RESOURCEPRESSUREVIEW_H
6060

61-
#include "View.h"
6261
#include "SourceMgr.h"
62+
#include "View.h"
6363
#include "llvm/MC/MCInstPrinter.h"
6464
#include "llvm/MC/MCSubtargetInfo.h"
6565
#include <map>

tools/llvm-mca/TimelineView.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,16 @@ void TimelineView::printTimelineViewEntry(raw_string_ostream &OS,
175175
if (Entry.CycleDispatched != Entry.CycleExecuted) {
176176
// Zero latency instructions have the same value for CycleDispatched,
177177
// CycleIssued and CycleExecuted.
178-
for (unsigned I = Entry.CycleDispatched + 1, E = Entry.CycleIssued; I < E; ++I)
178+
for (unsigned I = Entry.CycleDispatched + 1, E = Entry.CycleIssued; I < E;
179+
++I)
179180
OS << '=';
180181
if (Entry.CycleIssued == Entry.CycleExecuted)
181182
OS << 'E';
182183
else {
183184
if (Entry.CycleDispatched != Entry.CycleIssued)
184185
OS << 'e';
185-
for (unsigned I = Entry.CycleIssued + 1, E = Entry.CycleExecuted; I < E; ++I)
186+
for (unsigned I = Entry.CycleIssued + 1, E = Entry.CycleExecuted; I < E;
187+
++I)
186188
OS << 'e';
187189
OS << 'E';
188190
}

tools/llvm-mca/TimelineView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
#ifndef LLVM_TOOLS_LLVM_MCA_TIMELINEVIEW_H
101101
#define LLVM_TOOLS_LLVM_MCA_TIMELINEVIEW_H
102102

103-
#include "View.h"
104103
#include "SourceMgr.h"
104+
#include "View.h"
105105
#include "llvm/MC/MCInstPrinter.h"
106106
#include "llvm/MC/MCSubtargetInfo.h"
107107
#include "llvm/Support/raw_ostream.h"

tools/llvm-mca/llvm-mca.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
//
2222
//===----------------------------------------------------------------------===//
2323

24+
#include "BackendPrinter.h"
25+
#include "BackendStatistics.h"
26+
#include "ResourcePressureView.h"
27+
#include "TimelineView.h"
2428
#include "llvm/MC/MCAsmInfo.h"
2529
#include "llvm/MC/MCContext.h"
2630
#include "llvm/MC/MCObjectFileInfo.h"
@@ -37,11 +41,6 @@
3741
#include "llvm/Support/TargetRegistry.h"
3842
#include "llvm/Support/TargetSelect.h"
3943
#include "llvm/Support/ToolOutputFile.h"
40-
#include "BackendPrinter.h"
41-
#include "BackendStatistics.h"
42-
#include "ResourcePressureView.h"
43-
#include "TimelineView.h"
44-
4544

4645
using namespace llvm;
4746

0 commit comments

Comments
 (0)