1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[llvm-mca] run clang-format on all files.

This also addresses Simon's review comment in D44839.

llvm-svn: 328428
This commit is contained in:
Andrea Di Biagio 2018-03-24 16:05:36 +00:00
parent 9fb8bf4a44
commit 2b25cb95ef
19 changed files with 17 additions and 30 deletions

View File

@ -24,5 +24,4 @@ void BackendPrinter::printReport(llvm::raw_ostream &OS) const {
for (const auto &V : Views)
V->printView(OS);
}
} // namespace mca.

View File

@ -26,7 +26,6 @@
namespace mca {
/// \brief A printer class that knows how to collects statistics on the
/// code analyzed by the llvm-mca tool.
///
@ -48,7 +47,6 @@ public:
void printReport(llvm::raw_ostream &OS) const;
};
} // namespace mca
#endif

View File

@ -130,8 +130,8 @@ class BackendStatistics : public View {
public:
BackendStatistics(const llvm::MCSubtargetInfo &sti)
: STI(sti), NumDispatched(0), NumIssued(0), NumRetired(0),
NumCycles(0), HWStalls(HWStallEvent::LastGenericEvent),
: STI(sti), NumDispatched(0), NumIssued(0), NumRetired(0), NumCycles(0),
HWStalls(HWStallEvent::LastGenericEvent),
// TODO: The view currently assumes a single register file. This will
// change in future.
RegisterFiles(1) {}

View File

@ -223,8 +223,8 @@ unsigned RetireControlUnit::reserveSlot(unsigned Index, unsigned NumMicroOps) {
return TokenID;
}
void DispatchUnit::notifyInstructionDispatched(
unsigned Index, ArrayRef<unsigned> UsedRegs) {
void DispatchUnit::notifyInstructionDispatched(unsigned Index,
ArrayRef<unsigned> UsedRegs) {
DEBUG(dbgs() << "[E] Instruction Dispatched: " << Index << '\n');
Owner->notifyInstructionEvent(HWInstructionDispatchedEvent(Index, UsedRegs));
}
@ -389,5 +389,4 @@ void DispatchUnit::dump() const {
RCU->dump();
}
#endif
} // namespace mca

View File

@ -18,5 +18,4 @@ namespace mca {
// Anchor the vtable here.
void HWEventListener::anchor() {}
} // namespace mca

View File

@ -23,10 +23,10 @@ namespace mca {
using namespace llvm;
static void
initializeUsedResources(InstrDesc &ID, const MCSchedClassDesc &SCDesc,
const MCSubtargetInfo &STI,
ArrayRef<uint64_t> ProcResourceMasks) {
static void initializeUsedResources(InstrDesc &ID,
const MCSchedClassDesc &SCDesc,
const MCSubtargetInfo &STI,
ArrayRef<uint64_t> ProcResourceMasks) {
const MCSchedModel &SM = STI.getSchedModel();
// Populate resources consumed.

View File

@ -309,7 +309,6 @@ public:
void cycleEvent();
};
} // namespace mca
#endif

View File

@ -12,8 +12,8 @@
///
//===----------------------------------------------------------------------===//
#include "Instruction.h"
#include "LSUnit.h"
#include "Instruction.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@ -76,7 +76,8 @@ bool LSUnit::isReady(unsigned Index) const {
assert((IsALoad || IsAStore) && "Instruction is not in queue!");
unsigned LoadBarrierIndex = LoadBarriers.empty() ? 0 : *LoadBarriers.begin();
unsigned StoreBarrierIndex = StoreBarriers.empty() ? 0 : *StoreBarriers.begin();
unsigned StoreBarrierIndex =
StoreBarriers.empty() ? 0 : *StoreBarriers.begin();
if (IsALoad && LoadBarrierIndex) {
if (Index > LoadBarrierIndex)

View File

@ -144,7 +144,6 @@ public:
bool isReady(unsigned Index) const;
void onInstructionExecuted(unsigned Index);
};
} // namespace mca
#endif

View File

@ -170,5 +170,4 @@ void ResourcePressureView::printResourcePressurePerInstruction(
Buffer = "";
}
}
} // namespace mca

View File

@ -106,7 +106,6 @@ public:
printResourcePressurePerInstruction(OS, Executions);
}
};
} // namespace mca
#endif

View File

@ -418,9 +418,9 @@ class Scheduler {
std::map<unsigned, Instruction *> ReadyQueue;
std::map<unsigned, Instruction *> IssuedQueue;
void notifyInstructionIssued(
unsigned Index,
llvm::ArrayRef<std::pair<ResourceRef, double>> Used);
void
notifyInstructionIssued(unsigned Index,
llvm::ArrayRef<std::pair<ResourceRef, double>> Used);
void notifyInstructionExecuted(unsigned Index);
void notifyInstructionReady(unsigned Index);
void notifyResourceAvailable(const ResourceRef &RR);

View File

@ -59,7 +59,6 @@ public:
bool isEmpty() const { return size() == 0; }
};
} // namespace mca
#endif

View File

@ -38,5 +38,4 @@ void SummaryView::printView(raw_ostream &OS) const {
TempStream.flush();
OS << Buffer;
}
} // namespace mca.

View File

@ -233,5 +233,4 @@ void TimelineView::printTimeline(raw_ostream &OS) const {
OS << Buffer;
}
}
} // namespace mca

View File

@ -173,7 +173,6 @@ public:
printAverageWaitTimes(OS);
}
};
} // namespace mca
#endif

View File

@ -17,5 +17,4 @@
namespace mca {
void View::anchor() {}
} // namespace mca

View File

@ -27,7 +27,6 @@ public:
virtual ~View() = default;
void anchor() override;
};
}
} // namespace mca
#endif

View File

@ -342,7 +342,8 @@ int main(int argc, char **argv) {
Printer->addView(llvm::make_unique<mca::BackendStatistics>(*STI));
if (PrintResourcePressureView)
Printer->addView(llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, *S));
Printer->addView(
llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, *S));
if (PrintTimelineView) {
Printer->addView(llvm::make_unique<mca::TimelineView>(