summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-24 16:05:36 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-24 16:05:36 +0000
commit94fafdfdedcf9230331a0c4ba9629888657e187d (patch)
tree81f73329cc9a3696fc7739b711ca3d121c38b165
parent225d0db4e2d926a41a69e901422fb777d3a7ac67 (diff)
downloadbcm5719-llvm-94fafdfdedcf9230331a0c4ba9629888657e187d.tar.gz
bcm5719-llvm-94fafdfdedcf9230331a0c4ba9629888657e187d.zip
[llvm-mca] run clang-format on all files.
This also addresses Simon's review comment in D44839. llvm-svn: 328428
-rw-r--r--llvm/tools/llvm-mca/BackendPrinter.cpp1
-rw-r--r--llvm/tools/llvm-mca/BackendPrinter.h2
-rw-r--r--llvm/tools/llvm-mca/BackendStatistics.h4
-rw-r--r--llvm/tools/llvm-mca/Dispatch.cpp5
-rw-r--r--llvm/tools/llvm-mca/HWEventListener.cpp1
-rw-r--r--llvm/tools/llvm-mca/InstrBuilder.cpp8
-rw-r--r--llvm/tools/llvm-mca/Instruction.h1
-rw-r--r--llvm/tools/llvm-mca/LSUnit.cpp5
-rw-r--r--llvm/tools/llvm-mca/LSUnit.h1
-rw-r--r--llvm/tools/llvm-mca/ResourcePressureView.cpp1
-rw-r--r--llvm/tools/llvm-mca/ResourcePressureView.h1
-rw-r--r--llvm/tools/llvm-mca/Scheduler.h6
-rw-r--r--llvm/tools/llvm-mca/SourceMgr.h1
-rw-r--r--llvm/tools/llvm-mca/SummaryView.cpp1
-rw-r--r--llvm/tools/llvm-mca/TimelineView.cpp1
-rw-r--r--llvm/tools/llvm-mca/TimelineView.h1
-rw-r--r--llvm/tools/llvm-mca/View.cpp1
-rw-r--r--llvm/tools/llvm-mca/View.h3
-rw-r--r--llvm/tools/llvm-mca/llvm-mca.cpp3
19 files changed, 17 insertions, 30 deletions
diff --git a/llvm/tools/llvm-mca/BackendPrinter.cpp b/llvm/tools/llvm-mca/BackendPrinter.cpp
index 7772903a3d7..6fc78a5112b 100644
--- a/llvm/tools/llvm-mca/BackendPrinter.cpp
+++ b/llvm/tools/llvm-mca/BackendPrinter.cpp
@@ -24,5 +24,4 @@ void BackendPrinter::printReport(llvm::raw_ostream &OS) const {
for (const auto &V : Views)
V->printView(OS);
}
-
} // namespace mca.
diff --git a/llvm/tools/llvm-mca/BackendPrinter.h b/llvm/tools/llvm-mca/BackendPrinter.h
index d8ab123b679..d159a950baa 100644
--- a/llvm/tools/llvm-mca/BackendPrinter.h
+++ b/llvm/tools/llvm-mca/BackendPrinter.h
@@ -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
diff --git a/llvm/tools/llvm-mca/BackendStatistics.h b/llvm/tools/llvm-mca/BackendStatistics.h
index aff3bdeb736..5dc0c88d68e 100644
--- a/llvm/tools/llvm-mca/BackendStatistics.h
+++ b/llvm/tools/llvm-mca/BackendStatistics.h
@@ -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) {}
diff --git a/llvm/tools/llvm-mca/Dispatch.cpp b/llvm/tools/llvm-mca/Dispatch.cpp
index c1e5d3e707c..c0f16f07376 100644
--- a/llvm/tools/llvm-mca/Dispatch.cpp
+++ b/llvm/tools/llvm-mca/Dispatch.cpp
@@ -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
diff --git a/llvm/tools/llvm-mca/HWEventListener.cpp b/llvm/tools/llvm-mca/HWEventListener.cpp
index b385a36e194..f27a04a9a98 100644
--- a/llvm/tools/llvm-mca/HWEventListener.cpp
+++ b/llvm/tools/llvm-mca/HWEventListener.cpp
@@ -18,5 +18,4 @@ namespace mca {
// Anchor the vtable here.
void HWEventListener::anchor() {}
-
} // namespace mca
diff --git a/llvm/tools/llvm-mca/InstrBuilder.cpp b/llvm/tools/llvm-mca/InstrBuilder.cpp
index ea54c36436c..23da05fa722 100644
--- a/llvm/tools/llvm-mca/InstrBuilder.cpp
+++ b/llvm/tools/llvm-mca/InstrBuilder.cpp
@@ -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.
diff --git a/llvm/tools/llvm-mca/Instruction.h b/llvm/tools/llvm-mca/Instruction.h
index fb9551d96c2..ccb7c64ba0b 100644
--- a/llvm/tools/llvm-mca/Instruction.h
+++ b/llvm/tools/llvm-mca/Instruction.h
@@ -309,7 +309,6 @@ public:
void cycleEvent();
};
-
} // namespace mca
#endif
diff --git a/llvm/tools/llvm-mca/LSUnit.cpp b/llvm/tools/llvm-mca/LSUnit.cpp
index 115ef8f429e..c2358308270 100644
--- a/llvm/tools/llvm-mca/LSUnit.cpp
+++ b/llvm/tools/llvm-mca/LSUnit.cpp
@@ -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)
diff --git a/llvm/tools/llvm-mca/LSUnit.h b/llvm/tools/llvm-mca/LSUnit.h
index 8bf933d938f..3cfde5a55b7 100644
--- a/llvm/tools/llvm-mca/LSUnit.h
+++ b/llvm/tools/llvm-mca/LSUnit.h
@@ -144,7 +144,6 @@ public:
bool isReady(unsigned Index) const;
void onInstructionExecuted(unsigned Index);
};
-
} // namespace mca
#endif
diff --git a/llvm/tools/llvm-mca/ResourcePressureView.cpp b/llvm/tools/llvm-mca/ResourcePressureView.cpp
index 84564865b9d..11361246a24 100644
--- a/llvm/tools/llvm-mca/ResourcePressureView.cpp
+++ b/llvm/tools/llvm-mca/ResourcePressureView.cpp
@@ -170,5 +170,4 @@ void ResourcePressureView::printResourcePressurePerInstruction(
Buffer = "";
}
}
-
} // namespace mca
diff --git a/llvm/tools/llvm-mca/ResourcePressureView.h b/llvm/tools/llvm-mca/ResourcePressureView.h
index 7eb5f8304b7..570cdc63f1e 100644
--- a/llvm/tools/llvm-mca/ResourcePressureView.h
+++ b/llvm/tools/llvm-mca/ResourcePressureView.h
@@ -106,7 +106,6 @@ public:
printResourcePressurePerInstruction(OS, Executions);
}
};
-
} // namespace mca
#endif
diff --git a/llvm/tools/llvm-mca/Scheduler.h b/llvm/tools/llvm-mca/Scheduler.h
index a3ef14456a3..c690ad226ae 100644
--- a/llvm/tools/llvm-mca/Scheduler.h
+++ b/llvm/tools/llvm-mca/Scheduler.h
@@ -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);
diff --git a/llvm/tools/llvm-mca/SourceMgr.h b/llvm/tools/llvm-mca/SourceMgr.h
index 1712744dbe4..ec8abaf5940 100644
--- a/llvm/tools/llvm-mca/SourceMgr.h
+++ b/llvm/tools/llvm-mca/SourceMgr.h
@@ -59,7 +59,6 @@ public:
bool isEmpty() const { return size() == 0; }
};
-
} // namespace mca
#endif
diff --git a/llvm/tools/llvm-mca/SummaryView.cpp b/llvm/tools/llvm-mca/SummaryView.cpp
index f7d09006a49..511727bc750 100644
--- a/llvm/tools/llvm-mca/SummaryView.cpp
+++ b/llvm/tools/llvm-mca/SummaryView.cpp
@@ -38,5 +38,4 @@ void SummaryView::printView(raw_ostream &OS) const {
TempStream.flush();
OS << Buffer;
}
-
} // namespace mca.
diff --git a/llvm/tools/llvm-mca/TimelineView.cpp b/llvm/tools/llvm-mca/TimelineView.cpp
index c57cad7e5bc..9419fe4b4a6 100644
--- a/llvm/tools/llvm-mca/TimelineView.cpp
+++ b/llvm/tools/llvm-mca/TimelineView.cpp
@@ -233,5 +233,4 @@ void TimelineView::printTimeline(raw_ostream &OS) const {
OS << Buffer;
}
}
-
} // namespace mca
diff --git a/llvm/tools/llvm-mca/TimelineView.h b/llvm/tools/llvm-mca/TimelineView.h
index 7d337b8bffe..3ee448699e6 100644
--- a/llvm/tools/llvm-mca/TimelineView.h
+++ b/llvm/tools/llvm-mca/TimelineView.h
@@ -173,7 +173,6 @@ public:
printAverageWaitTimes(OS);
}
};
-
} // namespace mca
#endif
diff --git a/llvm/tools/llvm-mca/View.cpp b/llvm/tools/llvm-mca/View.cpp
index 1b54e4ea022..390a7aeb3b9 100644
--- a/llvm/tools/llvm-mca/View.cpp
+++ b/llvm/tools/llvm-mca/View.cpp
@@ -17,5 +17,4 @@
namespace mca {
void View::anchor() {}
-
} // namespace mca
diff --git a/llvm/tools/llvm-mca/View.h b/llvm/tools/llvm-mca/View.h
index e5d22866eb7..9ba94a5da97 100644
--- a/llvm/tools/llvm-mca/View.h
+++ b/llvm/tools/llvm-mca/View.h
@@ -27,7 +27,6 @@ public:
virtual ~View() = default;
void anchor() override;
};
-
-}
+} // namespace mca
#endif
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index 2ddba762f88..b397a4c8095 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -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>(
OpenPOWER on IntegriCloud