Skip to content

Commit db158be

Browse files
committed
[llvm-mca] Remove a couple of using directives and a bunch of redundant namespace llvm prefixes. NFC
llvm-svn: 344916
1 parent 5f5b910 commit db158be

7 files changed

+13
-16
lines changed

llvm/tools/llvm-mca/CodeRegion.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,21 @@
1414

1515
#include "CodeRegion.h"
1616

17-
using namespace llvm;
18-
1917
namespace mca {
2018

21-
bool CodeRegion::isLocInRange(SMLoc Loc) const {
19+
bool CodeRegion::isLocInRange(llvm::SMLoc Loc) const {
2220
if (RangeEnd.isValid() && Loc.getPointer() > RangeEnd.getPointer())
2321
return false;
2422
if (RangeStart.isValid() && Loc.getPointer() < RangeStart.getPointer())
2523
return false;
2624
return true;
2725
}
2826

29-
void CodeRegions::beginRegion(StringRef Description, SMLoc Loc) {
27+
void CodeRegions::beginRegion(llvm::StringRef Description, llvm::SMLoc Loc) {
3028
assert(!Regions.empty() && "Missing Default region");
3129
const CodeRegion &CurrentRegion = *Regions.back();
3230
if (CurrentRegion.startLoc().isValid() && !CurrentRegion.endLoc().isValid()) {
33-
SM.PrintMessage(Loc, SourceMgr::DK_Warning,
31+
SM.PrintMessage(Loc, llvm::SourceMgr::DK_Warning,
3432
"Ignoring invalid region start");
3533
return;
3634
}
@@ -41,19 +39,20 @@ void CodeRegions::beginRegion(StringRef Description, SMLoc Loc) {
4139
addRegion(Description, Loc);
4240
}
4341

44-
void CodeRegions::endRegion(SMLoc Loc) {
42+
void CodeRegions::endRegion(llvm::SMLoc Loc) {
4543
assert(!Regions.empty() && "Missing Default region");
4644
CodeRegion &CurrentRegion = *Regions.back();
4745
if (CurrentRegion.endLoc().isValid()) {
48-
SM.PrintMessage(Loc, SourceMgr::DK_Warning, "Ignoring invalid region end");
46+
SM.PrintMessage(Loc, llvm::SourceMgr::DK_Warning,
47+
"Ignoring invalid region end");
4948
return;
5049
}
5150

5251
CurrentRegion.setEndLocation(Loc);
5352
}
5453

55-
void CodeRegions::addInstruction(const MCInst &Instruction) {
56-
const SMLoc &Loc = Instruction.getLoc();
54+
void CodeRegions::addInstruction(const llvm::MCInst &Instruction) {
55+
const llvm::SMLoc &Loc = Instruction.getLoc();
5756
const auto It =
5857
std::find_if(Regions.rbegin(), Regions.rend(),
5958
[Loc](const std::unique_ptr<CodeRegion> &Region) {

llvm/tools/llvm-mca/PipelinePrinter.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
namespace mca {
1919

20-
using namespace llvm;
21-
2220
void PipelinePrinter::printReport(llvm::raw_ostream &OS) const {
2321
for (const auto &V : Views)
2422
V->printView(OS);

llvm/tools/llvm-mca/Views/DispatchStatistics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void DispatchStatistics::onEvent(const HWInstructionEvent &Event) {
3333
NumDispatched += DE.MicroOpcodes;
3434
}
3535

36-
void DispatchStatistics::printDispatchHistogram(llvm::raw_ostream &OS) const {
36+
void DispatchStatistics::printDispatchHistogram(raw_ostream &OS) const {
3737
std::string Buffer;
3838
raw_string_ostream TempStream(Buffer);
3939
TempStream << "\n\nDispatch Logic - "

llvm/tools/llvm-mca/Views/RegisterFileStatistics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ using namespace llvm;
1919

2020
namespace mca {
2121

22-
RegisterFileStatistics::RegisterFileStatistics(const llvm::MCSubtargetInfo &sti)
22+
RegisterFileStatistics::RegisterFileStatistics(const MCSubtargetInfo &sti)
2323
: STI(sti) {
2424
const MCSchedModel &SM = STI.getSchedModel();
2525
RegisterFileUsage Empty = {0, 0, 0};

llvm/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void RetireControlUnitStatistics::onEvent(const HWInstructionEvent &Event) {
2424
++NumRetired;
2525
}
2626

27-
void RetireControlUnitStatistics::printView(llvm::raw_ostream &OS) const {
27+
void RetireControlUnitStatistics::printView(raw_ostream &OS) const {
2828
std::string Buffer;
2929
raw_string_ostream TempStream(Buffer);
3030
TempStream << "\n\nRetire Control Unit - "

llvm/tools/llvm-mca/Views/SchedulerStatistics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void SchedulerStatistics::printSchedulerUsage(raw_ostream &OS) const {
121121
FOS.flush();
122122
}
123123

124-
void SchedulerStatistics::printView(llvm::raw_ostream &OS) const {
124+
void SchedulerStatistics::printView(raw_ostream &OS) const {
125125
printSchedulerStats(OS);
126126
printSchedulerUsage(OS);
127127
}

llvm/tools/llvm-mca/Views/SummaryView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace mca {
2424

2525
using namespace llvm;
2626

27-
SummaryView::SummaryView(const llvm::MCSchedModel &Model, const SourceMgr &S,
27+
SummaryView::SummaryView(const MCSchedModel &Model, const SourceMgr &S,
2828
unsigned Width)
2929
: SM(Model), Source(S), DispatchWidth(Width), TotalCycles(0),
3030
NumMicroOps(0), ProcResourceUsage(Model.getNumProcResourceKinds(), 0),

0 commit comments

Comments
 (0)