[llvm] r344916 - [llvm-mca] Remove a couple of using directives and a bunch of redundant namespace llvm prefixes. NFC
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 22 09:28:07 PDT 2018
Author: adibiagio
Date: Mon Oct 22 09:28:07 2018
New Revision: 344916
URL: http://llvm.org/viewvc/llvm-project?rev=344916&view=rev
Log:
[llvm-mca] Remove a couple of using directives and a bunch of redundant namespace llvm prefixes. NFC
Modified:
llvm/trunk/tools/llvm-mca/CodeRegion.cpp
llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp
llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp
Modified: llvm/trunk/tools/llvm-mca/CodeRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/CodeRegion.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/CodeRegion.cpp (original)
+++ llvm/trunk/tools/llvm-mca/CodeRegion.cpp Mon Oct 22 09:28:07 2018
@@ -14,11 +14,9 @@
#include "CodeRegion.h"
-using namespace llvm;
-
namespace mca {
-bool CodeRegion::isLocInRange(SMLoc Loc) const {
+bool CodeRegion::isLocInRange(llvm::SMLoc Loc) const {
if (RangeEnd.isValid() && Loc.getPointer() > RangeEnd.getPointer())
return false;
if (RangeStart.isValid() && Loc.getPointer() < RangeStart.getPointer())
@@ -26,11 +24,11 @@ bool CodeRegion::isLocInRange(SMLoc Loc)
return true;
}
-void CodeRegions::beginRegion(StringRef Description, SMLoc Loc) {
+void CodeRegions::beginRegion(llvm::StringRef Description, llvm::SMLoc Loc) {
assert(!Regions.empty() && "Missing Default region");
const CodeRegion &CurrentRegion = *Regions.back();
if (CurrentRegion.startLoc().isValid() && !CurrentRegion.endLoc().isValid()) {
- SM.PrintMessage(Loc, SourceMgr::DK_Warning,
+ SM.PrintMessage(Loc, llvm::SourceMgr::DK_Warning,
"Ignoring invalid region start");
return;
}
@@ -41,19 +39,20 @@ void CodeRegions::beginRegion(StringRef
addRegion(Description, Loc);
}
-void CodeRegions::endRegion(SMLoc Loc) {
+void CodeRegions::endRegion(llvm::SMLoc Loc) {
assert(!Regions.empty() && "Missing Default region");
CodeRegion &CurrentRegion = *Regions.back();
if (CurrentRegion.endLoc().isValid()) {
- SM.PrintMessage(Loc, SourceMgr::DK_Warning, "Ignoring invalid region end");
+ SM.PrintMessage(Loc, llvm::SourceMgr::DK_Warning,
+ "Ignoring invalid region end");
return;
}
CurrentRegion.setEndLocation(Loc);
}
-void CodeRegions::addInstruction(const MCInst &Instruction) {
- const SMLoc &Loc = Instruction.getLoc();
+void CodeRegions::addInstruction(const llvm::MCInst &Instruction) {
+ const llvm::SMLoc &Loc = Instruction.getLoc();
const auto It =
std::find_if(Regions.rbegin(), Regions.rend(),
[Loc](const std::unique_ptr<CodeRegion> &Region) {
Modified: llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp (original)
+++ llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp Mon Oct 22 09:28:07 2018
@@ -17,8 +17,6 @@
namespace mca {
-using namespace llvm;
-
void PipelinePrinter::printReport(llvm::raw_ostream &OS) const {
for (const auto &V : Views)
V->printView(OS);
Modified: llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp Mon Oct 22 09:28:07 2018
@@ -33,7 +33,7 @@ void DispatchStatistics::onEvent(const H
NumDispatched += DE.MicroOpcodes;
}
-void DispatchStatistics::printDispatchHistogram(llvm::raw_ostream &OS) const {
+void DispatchStatistics::printDispatchHistogram(raw_ostream &OS) const {
std::string Buffer;
raw_string_ostream TempStream(Buffer);
TempStream << "\n\nDispatch Logic - "
Modified: llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp Mon Oct 22 09:28:07 2018
@@ -19,7 +19,7 @@ using namespace llvm;
namespace mca {
-RegisterFileStatistics::RegisterFileStatistics(const llvm::MCSubtargetInfo &sti)
+RegisterFileStatistics::RegisterFileStatistics(const MCSubtargetInfo &sti)
: STI(sti) {
const MCSchedModel &SM = STI.getSchedModel();
RegisterFileUsage Empty = {0, 0, 0};
Modified: llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp Mon Oct 22 09:28:07 2018
@@ -24,7 +24,7 @@ void RetireControlUnitStatistics::onEven
++NumRetired;
}
-void RetireControlUnitStatistics::printView(llvm::raw_ostream &OS) const {
+void RetireControlUnitStatistics::printView(raw_ostream &OS) const {
std::string Buffer;
raw_string_ostream TempStream(Buffer);
TempStream << "\n\nRetire Control Unit - "
Modified: llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp Mon Oct 22 09:28:07 2018
@@ -121,7 +121,7 @@ void SchedulerStatistics::printScheduler
FOS.flush();
}
-void SchedulerStatistics::printView(llvm::raw_ostream &OS) const {
+void SchedulerStatistics::printView(raw_ostream &OS) const {
printSchedulerStats(OS);
printSchedulerUsage(OS);
}
Modified: llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp?rev=344916&r1=344915&r2=344916&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp Mon Oct 22 09:28:07 2018
@@ -24,7 +24,7 @@ namespace mca {
using namespace llvm;
-SummaryView::SummaryView(const llvm::MCSchedModel &Model, const SourceMgr &S,
+SummaryView::SummaryView(const MCSchedModel &Model, const SourceMgr &S,
unsigned Width)
: SM(Model), Source(S), DispatchWidth(Width), TotalCycles(0),
NumMicroOps(0), ProcResourceUsage(Model.getNumProcResourceKinds(), 0),
More information about the llvm-commits
mailing list