[llvm] r345612 - [llvm-mca] Move namespace mca inside llvm::
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 08:56:08 PDT 2018
Author: maskray
Date: Tue Oct 30 08:56:08 2018
New Revision: 345612
URL: http://llvm.org/viewvc/llvm-project?rev=345612&view=rev
Log:
[llvm-mca] Move namespace mca inside llvm::
Summary: This allows to remove `using namespace llvm;` in those *.cpp files
When we want to revisit the decision (everything resides in llvm::mca::*) in the future, we can move things to a nested namespace of llvm::mca::, to conceptually make them separate from the rest of llvm::mca::*
Reviewers: andreadb, mattd
Reviewed By: andreadb
Subscribers: javed.absar, tschuett, gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D53407
Modified:
llvm/trunk/tools/llvm-mca/CodeRegion.cpp
llvm/trunk/tools/llvm-mca/CodeRegion.h
llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp
llvm/trunk/tools/llvm-mca/PipelinePrinter.h
llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.h
llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.cpp
llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.h
llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.h
llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.cpp
llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.h
llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.h
llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp
llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.h
llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp
llvm/trunk/tools/llvm-mca/Views/SummaryView.h
llvm/trunk/tools/llvm-mca/Views/TimelineView.cpp
llvm/trunk/tools/llvm-mca/Views/TimelineView.h
llvm/trunk/tools/llvm-mca/Views/View.cpp
llvm/trunk/tools/llvm-mca/Views/View.h
llvm/trunk/tools/llvm-mca/include/Context.h
llvm/trunk/tools/llvm-mca/include/HWEventListener.h
llvm/trunk/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h
llvm/trunk/tools/llvm-mca/include/HardwareUnits/LSUnit.h
llvm/trunk/tools/llvm-mca/include/HardwareUnits/RegisterFile.h
llvm/trunk/tools/llvm-mca/include/HardwareUnits/ResourceManager.h
llvm/trunk/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h
llvm/trunk/tools/llvm-mca/include/HardwareUnits/Scheduler.h
llvm/trunk/tools/llvm-mca/include/InstrBuilder.h
llvm/trunk/tools/llvm-mca/include/Instruction.h
llvm/trunk/tools/llvm-mca/include/Pipeline.h
llvm/trunk/tools/llvm-mca/include/SourceMgr.h
llvm/trunk/tools/llvm-mca/include/Stages/DispatchStage.h
llvm/trunk/tools/llvm-mca/include/Stages/ExecuteStage.h
llvm/trunk/tools/llvm-mca/include/Stages/FetchStage.h
llvm/trunk/tools/llvm-mca/include/Stages/InstructionTables.h
llvm/trunk/tools/llvm-mca/include/Stages/RetireStage.h
llvm/trunk/tools/llvm-mca/include/Stages/Stage.h
llvm/trunk/tools/llvm-mca/include/Support.h
llvm/trunk/tools/llvm-mca/lib/Context.cpp
llvm/trunk/tools/llvm-mca/lib/HWEventListener.cpp
llvm/trunk/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp
llvm/trunk/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp
llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
llvm/trunk/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp
llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
llvm/trunk/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp
llvm/trunk/tools/llvm-mca/lib/InstrBuilder.cpp
llvm/trunk/tools/llvm-mca/lib/Instruction.cpp
llvm/trunk/tools/llvm-mca/lib/Pipeline.cpp
llvm/trunk/tools/llvm-mca/lib/Stages/DispatchStage.cpp
llvm/trunk/tools/llvm-mca/lib/Stages/ExecuteStage.cpp
llvm/trunk/tools/llvm-mca/lib/Stages/FetchStage.cpp
llvm/trunk/tools/llvm-mca/lib/Stages/InstructionTables.cpp
llvm/trunk/tools/llvm-mca/lib/Stages/RetireStage.cpp
llvm/trunk/tools/llvm-mca/lib/Stages/Stage.cpp
llvm/trunk/tools/llvm-mca/lib/Support.cpp
Modified: llvm/trunk/tools/llvm-mca/CodeRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/CodeRegion.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/CodeRegion.cpp (original)
+++ llvm/trunk/tools/llvm-mca/CodeRegion.cpp Tue Oct 30 08:56:08 2018
@@ -14,6 +14,7 @@
#include "CodeRegion.h"
+namespace llvm {
namespace mca {
bool CodeRegion::isLocInRange(llvm::SMLoc Loc) const {
@@ -63,3 +64,4 @@ void CodeRegions::addInstruction(const l
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/CodeRegion.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/CodeRegion.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/CodeRegion.h (original)
+++ llvm/trunk/tools/llvm-mca/CodeRegion.h Tue Oct 30 08:56:08 2018
@@ -41,6 +41,7 @@
#include "llvm/Support/SourceMgr.h"
#include <vector>
+namespace llvm {
namespace mca {
/// A region of assembly code.
@@ -123,5 +124,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp (original)
+++ llvm/trunk/tools/llvm-mca/PipelinePrinter.cpp Tue Oct 30 08:56:08 2018
@@ -15,6 +15,7 @@
#include "PipelinePrinter.h"
#include "Views/View.h"
+namespace llvm {
namespace mca {
void PipelinePrinter::printReport(llvm::raw_ostream &OS) const {
@@ -22,3 +23,4 @@ void PipelinePrinter::printReport(llvm::
V->printView(OS);
}
} // namespace mca.
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/PipelinePrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/PipelinePrinter.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/PipelinePrinter.h (original)
+++ llvm/trunk/tools/llvm-mca/PipelinePrinter.h Tue Oct 30 08:56:08 2018
@@ -24,6 +24,7 @@
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
/// A printer class that knows how to collects statistics on the
@@ -48,5 +49,6 @@ public:
void printReport(llvm::raw_ostream &OS) const;
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_PIPELINEPRINTER_H
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=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.cpp Tue Oct 30 08:56:08 2018
@@ -16,8 +16,7 @@
#include "Views/DispatchStatistics.h"
#include "llvm/Support/Format.h"
-using namespace llvm;
-
+namespace llvm {
namespace mca {
void DispatchStatistics::onEvent(const HWStallEvent &Event) {
@@ -84,3 +83,4 @@ void DispatchStatistics::printDispatchSt
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/DispatchStatistics.h Tue Oct 30 08:56:08 2018
@@ -39,6 +39,7 @@
#include "llvm/MC/MCSubtargetInfo.h"
#include <map>
+namespace llvm {
namespace mca {
class DispatchStatistics : public View {
@@ -80,5 +81,6 @@ public:
}
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.cpp Tue Oct 30 08:56:08 2018
@@ -14,10 +14,9 @@
#include "Views/InstructionInfoView.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
void InstructionInfoView::printView(raw_ostream &OS) const {
std::string Buffer;
raw_string_ostream TempStream(Buffer);
@@ -87,3 +86,4 @@ void InstructionInfoView::printView(raw_
OS << Buffer;
}
} // namespace mca.
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/InstructionInfoView.h Tue Oct 30 08:56:08 2018
@@ -45,6 +45,7 @@
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
/// A view that prints out generic instruction information.
@@ -63,5 +64,6 @@ public:
void printView(llvm::raw_ostream &OS) const override;
};
} // namespace mca
+} // namespace llvm
#endif
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=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.cpp Tue Oct 30 08:56:08 2018
@@ -15,8 +15,7 @@
#include "Views/RegisterFileStatistics.h"
#include "llvm/Support/Format.h"
-using namespace llvm;
-
+namespace llvm {
namespace mca {
RegisterFileStatistics::RegisterFileStatistics(const MCSubtargetInfo &sti)
@@ -106,3 +105,4 @@ void RegisterFileStatistics::printView(r
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/RegisterFileStatistics.h Tue Oct 30 08:56:08 2018
@@ -36,6 +36,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSubtargetInfo.h"
+namespace llvm {
namespace mca {
class RegisterFileStatistics : public View {
@@ -58,5 +59,6 @@ public:
void printView(llvm::raw_ostream &OS) const override;
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.cpp Tue Oct 30 08:56:08 2018
@@ -16,10 +16,9 @@
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
ResourcePressureView::ResourcePressureView(const llvm::MCSubtargetInfo &sti,
MCInstPrinter &Printer,
ArrayRef<MCInst> S)
@@ -183,3 +182,4 @@ void ResourcePressureView::printResource
}
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/ResourcePressureView.h Tue Oct 30 08:56:08 2018
@@ -65,6 +65,7 @@
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCSubtargetInfo.h"
+namespace llvm {
namespace mca {
/// This class collects resource pressure statistics and it is able to print
@@ -98,5 +99,6 @@ public:
}
};
} // namespace mca
+} // namespace llvm
#endif
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=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp Tue Oct 30 08:56:08 2018
@@ -15,8 +15,7 @@
#include "Views/RetireControlUnitStatistics.h"
#include "llvm/Support/Format.h"
-using namespace llvm;
-
+namespace llvm {
namespace mca {
void RetireControlUnitStatistics::onEvent(const HWInstructionEvent &Event) {
@@ -47,3 +46,4 @@ void RetireControlUnitStatistics::printV
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/RetireControlUnitStatistics.h Tue Oct 30 08:56:08 2018
@@ -30,6 +30,7 @@
#include "llvm/MC/MCSubtargetInfo.h"
#include <map>
+namespace llvm {
namespace mca {
class RetireControlUnitStatistics : public View {
@@ -54,5 +55,6 @@ public:
void printView(llvm::raw_ostream &OS) const override;
};
} // namespace mca
+} // namespace llvm
#endif
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=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.cpp Tue Oct 30 08:56:08 2018
@@ -16,8 +16,7 @@
#include "llvm/Support/Format.h"
#include "llvm/Support/FormattedStream.h"
-using namespace llvm;
-
+namespace llvm {
namespace mca {
void SchedulerStatistics::onEvent(const HWInstructionEvent &Event) {
@@ -127,3 +126,4 @@ void SchedulerStatistics::printView(raw_
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/SchedulerStatistics.h Tue Oct 30 08:56:08 2018
@@ -42,6 +42,7 @@
#include "llvm/MC/MCSubtargetInfo.h"
#include <map>
+namespace llvm {
namespace mca {
class SchedulerStatistics final : public View {
@@ -86,5 +87,6 @@ public:
void printView(llvm::raw_ostream &OS) const override;
};
} // namespace mca
+} // namespace llvm
#endif
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=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/SummaryView.cpp Tue Oct 30 08:56:08 2018
@@ -18,12 +18,11 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Format.h"
+namespace llvm {
namespace mca {
#define DEBUG_TYPE "llvm-mca"
-using namespace llvm;
-
SummaryView::SummaryView(const MCSchedModel &Model, ArrayRef<MCInst> S,
unsigned Width)
: SM(Model), Source(S), DispatchWidth(Width), LastInstructionIdx(0),
@@ -88,3 +87,4 @@ void SummaryView::printView(raw_ostream
OS << Buffer;
}
} // namespace mca.
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/SummaryView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/SummaryView.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/SummaryView.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/SummaryView.h Tue Oct 30 08:56:08 2018
@@ -34,6 +34,7 @@
#include "llvm/MC/MCSchedule.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
/// A view that collects and prints a few performance numbers.
@@ -71,5 +72,6 @@ public:
void printView(llvm::raw_ostream &OS) const override;
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/Views/TimelineView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/TimelineView.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/TimelineView.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/TimelineView.cpp Tue Oct 30 08:56:08 2018
@@ -14,8 +14,7 @@
#include "Views/TimelineView.h"
-using namespace llvm;
-
+namespace llvm {
namespace mca {
TimelineView::TimelineView(const MCSubtargetInfo &sti, MCInstPrinter &Printer,
@@ -292,3 +291,4 @@ void TimelineView::printTimeline(raw_ost
}
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/TimelineView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/TimelineView.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/TimelineView.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/TimelineView.h Tue Oct 30 08:56:08 2018
@@ -108,6 +108,7 @@
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
/// This class listens to instruction state transition events
@@ -183,5 +184,6 @@ public:
}
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/Views/View.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/View.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/View.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/View.cpp Tue Oct 30 08:56:08 2018
@@ -14,7 +14,9 @@
#include "Views/View.h"
+namespace llvm {
namespace mca {
void View::anchor() {}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/Views/View.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/View.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/View.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/View.h Tue Oct 30 08:56:08 2018
@@ -19,6 +19,7 @@
#include "HWEventListener.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
class View : public HWEventListener {
@@ -28,5 +29,6 @@ public:
void anchor() override;
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/Context.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Context.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Context.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Context.h Tue Oct 30 08:56:08 2018
@@ -25,6 +25,7 @@
#include "llvm/MC/MCSubtargetInfo.h"
#include <memory>
+namespace llvm {
namespace mca {
/// This is a convenience struct to hold the parameters necessary for creating
@@ -64,4 +65,5 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_CONTEXT_H
Modified: llvm/trunk/tools/llvm-mca/include/HWEventListener.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HWEventListener.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HWEventListener.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HWEventListener.h Tue Oct 30 08:56:08 2018
@@ -19,6 +19,7 @@
#include "Support.h"
#include "llvm/ADT/ArrayRef.h"
+namespace llvm {
namespace mca {
// An HWInstructionEvent represents state changes of instructions that
@@ -151,5 +152,6 @@ private:
virtual void anchor();
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HardwareUnits/HardwareUnit.h Tue Oct 30 08:56:08 2018
@@ -16,6 +16,7 @@
#ifndef LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H
#define LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H
+namespace llvm {
namespace mca {
class HardwareUnit {
@@ -28,4 +29,5 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_HARDWAREUNIT_H
Modified: llvm/trunk/tools/llvm-mca/include/HardwareUnits/LSUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HardwareUnits/LSUnit.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HardwareUnits/LSUnit.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HardwareUnits/LSUnit.h Tue Oct 30 08:56:08 2018
@@ -19,6 +19,7 @@
#include "HardwareUnits/HardwareUnit.h"
#include <set>
+namespace llvm {
namespace mca {
class InstRef;
@@ -156,5 +157,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/HardwareUnits/RegisterFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HardwareUnits/RegisterFile.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HardwareUnits/RegisterFile.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HardwareUnits/RegisterFile.h Tue Oct 30 08:56:08 2018
@@ -24,6 +24,7 @@
#include "llvm/MC/MCSchedule.h"
#include "llvm/Support/Error.h"
+namespace llvm {
namespace mca {
class ReadState;
@@ -225,5 +226,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_REGISTER_FILE_H
Modified: llvm/trunk/tools/llvm-mca/include/HardwareUnits/ResourceManager.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HardwareUnits/ResourceManager.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HardwareUnits/ResourceManager.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HardwareUnits/ResourceManager.h Tue Oct 30 08:56:08 2018
@@ -23,6 +23,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSchedule.h"
+namespace llvm {
namespace mca {
/// Used to notify the internal state of a processor resource.
@@ -357,5 +358,6 @@ public:
#endif
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_RESOURCE_MANAGER_H
Modified: llvm/trunk/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h Tue Oct 30 08:56:08 2018
@@ -20,6 +20,7 @@
#include "llvm/MC/MCSchedule.h"
#include <vector>
+namespace llvm {
namespace mca {
/// This class tracks which instructions are in-flight (i.e., dispatched but not
@@ -98,5 +99,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_RETIRE_CONTROL_UNIT_H
Modified: llvm/trunk/tools/llvm-mca/include/HardwareUnits/Scheduler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/HardwareUnits/Scheduler.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/HardwareUnits/Scheduler.h (original)
+++ llvm/trunk/tools/llvm-mca/include/HardwareUnits/Scheduler.h Tue Oct 30 08:56:08 2018
@@ -22,6 +22,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSchedule.h"
+namespace llvm {
namespace mca {
class SchedulerStrategy {
@@ -209,5 +210,6 @@ public:
#endif // !NDEBUG
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_SCHEDULER_H
Modified: llvm/trunk/tools/llvm-mca/include/InstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/InstrBuilder.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/InstrBuilder.h (original)
+++ llvm/trunk/tools/llvm-mca/include/InstrBuilder.h Tue Oct 30 08:56:08 2018
@@ -23,6 +23,7 @@
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/Error.h"
+namespace llvm {
namespace mca {
/// A builder class that knows how to construct Instruction objects.
@@ -71,5 +72,6 @@ public:
createInstruction(const llvm::MCInst &MCI);
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/Instruction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Instruction.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Instruction.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Instruction.h Tue Oct 30 08:56:08 2018
@@ -29,6 +29,7 @@
#include <set>
#include <vector>
+namespace llvm {
namespace mca {
constexpr int UNKNOWN_CYCLES = -512;
@@ -508,5 +509,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/Pipeline.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Pipeline.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Pipeline.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Pipeline.h Tue Oct 30 08:56:08 2018
@@ -21,6 +21,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Error.h"
+namespace llvm {
namespace mca {
class HWEventListener;
@@ -70,5 +71,6 @@ public:
void addEventListener(HWEventListener *Listener);
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_PIPELINE_H
Modified: llvm/trunk/tools/llvm-mca/include/SourceMgr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/SourceMgr.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/SourceMgr.h (original)
+++ llvm/trunk/tools/llvm-mca/include/SourceMgr.h Tue Oct 30 08:56:08 2018
@@ -18,6 +18,7 @@
#include "llvm/ADT/ArrayRef.h"
+namespace llvm {
namespace mca {
class Instruction;
@@ -51,5 +52,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/Stages/DispatchStage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Stages/DispatchStage.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Stages/DispatchStage.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Stages/DispatchStage.h Tue Oct 30 08:56:08 2018
@@ -27,6 +27,7 @@
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
+namespace llvm {
namespace mca {
// Implements the hardware dispatch logic.
@@ -92,5 +93,6 @@ public:
#endif
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_DISPATCH_STAGE_H
Modified: llvm/trunk/tools/llvm-mca/include/Stages/ExecuteStage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Stages/ExecuteStage.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Stages/ExecuteStage.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Stages/ExecuteStage.h Tue Oct 30 08:56:08 2018
@@ -23,6 +23,7 @@
#include "Stages/Stage.h"
#include "llvm/ADT/ArrayRef.h"
+namespace llvm {
namespace mca {
class ExecuteStage final : public Stage {
@@ -74,5 +75,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_EXECUTE_STAGE_H
Modified: llvm/trunk/tools/llvm-mca/include/Stages/FetchStage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Stages/FetchStage.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Stages/FetchStage.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Stages/FetchStage.h Tue Oct 30 08:56:08 2018
@@ -20,6 +20,7 @@
#include "Stages/Stage.h"
#include <map>
+namespace llvm {
namespace mca {
class FetchStage final : public Stage {
@@ -45,5 +46,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_FETCH_STAGE_H
Modified: llvm/trunk/tools/llvm-mca/include/Stages/InstructionTables.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Stages/InstructionTables.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Stages/InstructionTables.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Stages/InstructionTables.h Tue Oct 30 08:56:08 2018
@@ -23,6 +23,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCSchedule.h"
+namespace llvm {
namespace mca {
class InstructionTables final : public Stage {
@@ -39,5 +40,6 @@ public:
llvm::Error execute(InstRef &IR) override;
};
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/include/Stages/RetireStage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Stages/RetireStage.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Stages/RetireStage.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Stages/RetireStage.h Tue Oct 30 08:56:08 2018
@@ -21,6 +21,7 @@
#include "HardwareUnits/RetireControlUnit.h"
#include "Stages/Stage.h"
+namespace llvm {
namespace mca {
class RetireStage final : public Stage {
@@ -42,5 +43,6 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_RETIRE_STAGE_H
Modified: llvm/trunk/tools/llvm-mca/include/Stages/Stage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Stages/Stage.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Stages/Stage.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Stages/Stage.h Tue Oct 30 08:56:08 2018
@@ -20,6 +20,7 @@
#include "llvm/Support/Error.h"
#include <set>
+namespace llvm {
namespace mca {
class InstRef;
@@ -83,4 +84,5 @@ public:
};
} // namespace mca
+} // namespace llvm
#endif // LLVM_TOOLS_LLVM_MCA_STAGE_H
Modified: llvm/trunk/tools/llvm-mca/include/Support.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/include/Support.h?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/include/Support.h (original)
+++ llvm/trunk/tools/llvm-mca/include/Support.h Tue Oct 30 08:56:08 2018
@@ -20,6 +20,7 @@
#include "llvm/MC/MCSchedule.h"
#include "llvm/Support/Error.h"
+namespace llvm {
namespace mca {
template <typename T>
@@ -114,5 +115,6 @@ double computeBlockRThroughput(const llv
unsigned DispatchWidth, unsigned NumMicroOps,
llvm::ArrayRef<unsigned> ProcResourceUsage);
} // namespace mca
+} // namespace llvm
#endif
Modified: llvm/trunk/tools/llvm-mca/lib/Context.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Context.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Context.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Context.cpp Tue Oct 30 08:56:08 2018
@@ -24,10 +24,9 @@
#include "Stages/FetchStage.h"
#include "Stages/RetireStage.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
std::unique_ptr<Pipeline>
Context::createDefaultPipeline(const PipelineOptions &Opts, InstrBuilder &IB,
SourceMgr &SrcMgr) {
@@ -63,3 +62,4 @@ Context::createDefaultPipeline(const Pip
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HWEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HWEventListener.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HWEventListener.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HWEventListener.cpp Tue Oct 30 08:56:08 2018
@@ -14,8 +14,10 @@
#include "HWEventListener.h"
+namespace llvm {
namespace mca {
// Anchor the vtable here.
void HWEventListener::anchor() {}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HardwareUnits/HardwareUnit.cpp Tue Oct 30 08:56:08 2018
@@ -15,9 +15,11 @@
#include "HardwareUnits/HardwareUnit.h"
+namespace llvm {
namespace mca {
// Pin the vtable with this method.
HardwareUnit::~HardwareUnit() = default;
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HardwareUnits/LSUnit.cpp Tue Oct 30 08:56:08 2018
@@ -17,10 +17,9 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
-using namespace llvm;
-
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
#ifndef NDEBUG
@@ -164,3 +163,4 @@ void LSUnit::onInstructionExecuted(const
}
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RegisterFile.cpp Tue Oct 30 08:56:08 2018
@@ -18,10 +18,9 @@
#include "Instruction.h"
#include "llvm/Support/Debug.h"
-using namespace llvm;
-
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
RegisterFile::RegisterFile(const MCSchedModel &SM, const MCRegisterInfo &mri,
@@ -469,3 +468,4 @@ void RegisterFile::dump() const {
#endif
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp Tue Oct 30 08:56:08 2018
@@ -18,10 +18,9 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
#define DEBUG_TYPE "llvm-mca"
ResourceStrategy::~ResourceStrategy() = default;
@@ -305,3 +304,4 @@ void ResourceManager::releaseResource(ui
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HardwareUnits/RetireControlUnit.cpp Tue Oct 30 08:56:08 2018
@@ -15,10 +15,9 @@
#include "HardwareUnits/RetireControlUnit.h"
#include "llvm/Support/Debug.h"
-using namespace llvm;
-
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
RetireControlUnit::RetireControlUnit(const MCSchedModel &SM)
@@ -85,3 +84,4 @@ void RetireControlUnit::dump() const {
#endif
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp Tue Oct 30 08:56:08 2018
@@ -15,10 +15,9 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
#define DEBUG_TYPE "llvm-mca"
void Scheduler::initializeStrategy(std::unique_ptr<SchedulerStrategy> S) {
@@ -243,3 +242,4 @@ bool Scheduler::isReady(const InstRef &I
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/InstrBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/InstrBuilder.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/InstrBuilder.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/InstrBuilder.cpp Tue Oct 30 08:56:08 2018
@@ -22,10 +22,9 @@
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
InstrBuilder::InstrBuilder(const llvm::MCSubtargetInfo &sti,
const llvm::MCInstrInfo &mcii,
const llvm::MCRegisterInfo &mri,
@@ -539,3 +538,4 @@ InstrBuilder::createInstruction(const MC
return std::move(NewIS);
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Instruction.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Instruction.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Instruction.cpp Tue Oct 30 08:56:08 2018
@@ -16,10 +16,9 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
void ReadState::writeStartEvent(unsigned Cycles) {
assert(DependentWrites);
assert(CyclesLeft == UNKNOWN_CYCLES);
@@ -181,3 +180,4 @@ void Instruction::cycleEvent() {
const unsigned WriteRef::INVALID_IID = std::numeric_limits<unsigned>::max();
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Pipeline.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Pipeline.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Pipeline.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Pipeline.cpp Tue Oct 30 08:56:08 2018
@@ -17,12 +17,11 @@
#include "HWEventListener.h"
#include "llvm/Support/Debug.h"
+namespace llvm {
namespace mca {
#define DEBUG_TYPE "llvm-mca"
-using namespace llvm;
-
void Pipeline::addEventListener(HWEventListener *Listener) {
if (Listener)
Listeners.insert(Listener);
@@ -95,3 +94,4 @@ void Pipeline::notifyCycleEnd() {
Listener->onCycleEnd();
}
} // namespace mca.
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Stages/DispatchStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Stages/DispatchStage.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Stages/DispatchStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Stages/DispatchStage.cpp Tue Oct 30 08:56:08 2018
@@ -21,10 +21,9 @@
#include "HardwareUnits/Scheduler.h"
#include "llvm/Support/Debug.h"
-using namespace llvm;
-
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
void DispatchStage::notifyInstructionDispatched(const InstRef &IR,
@@ -185,3 +184,4 @@ void DispatchStage::dump() const {
}
#endif
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Stages/ExecuteStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Stages/ExecuteStage.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Stages/ExecuteStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Stages/ExecuteStage.cpp Tue Oct 30 08:56:08 2018
@@ -21,10 +21,9 @@
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
HWStallEvent::GenericEventType toHWStallEventType(Scheduler::Status Status) {
switch (Status) {
case Scheduler::SC_LOAD_QUEUE_FULL:
@@ -217,3 +216,4 @@ void ExecuteStage::notifyReservedOrRelea
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Stages/FetchStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Stages/FetchStage.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Stages/FetchStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Stages/FetchStage.cpp Tue Oct 30 08:56:08 2018
@@ -16,6 +16,7 @@
#include "Stages/FetchStage.h"
#include "Instruction.h"
+namespace llvm {
namespace mca {
bool FetchStage::hasWorkToComplete() const { return CurrentInstruction; }
@@ -69,3 +70,4 @@ llvm::Error FetchStage::cycleEnd() {
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Stages/InstructionTables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Stages/InstructionTables.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Stages/InstructionTables.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Stages/InstructionTables.cpp Tue Oct 30 08:56:08 2018
@@ -17,10 +17,9 @@
#include "Stages/InstructionTables.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
Error InstructionTables::execute(InstRef &IR) {
const InstrDesc &Desc = IR.getInstruction()->getDesc();
UsedResources.clear();
@@ -67,3 +66,4 @@ Error InstructionTables::execute(InstRef
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Stages/RetireStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Stages/RetireStage.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Stages/RetireStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Stages/RetireStage.cpp Tue Oct 30 08:56:08 2018
@@ -20,6 +20,7 @@
#define DEBUG_TYPE "llvm-mca"
+namespace llvm {
namespace mca {
llvm::Error RetireStage::cycleStart() {
@@ -58,3 +59,4 @@ void RetireStage::notifyInstructionRetir
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Stages/Stage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Stages/Stage.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Stages/Stage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Stages/Stage.cpp Tue Oct 30 08:56:08 2018
@@ -15,6 +15,7 @@
#include "Stages/Stage.h"
+namespace llvm {
namespace mca {
// Pin the vtable here in the implementation file.
@@ -25,3 +26,4 @@ void Stage::addListener(HWEventListener
}
} // namespace mca
+} // namespace llvm
Modified: llvm/trunk/tools/llvm-mca/lib/Support.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/lib/Support.cpp?rev=345612&r1=345611&r2=345612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Support.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Support.cpp Tue Oct 30 08:56:08 2018
@@ -16,10 +16,9 @@
#include "Support.h"
#include "llvm/MC/MCSchedule.h"
+namespace llvm {
namespace mca {
-using namespace llvm;
-
void computeProcResourceMasks(const MCSchedModel &SM,
SmallVectorImpl<uint64_t> &Masks) {
unsigned ProcResourceID = 0;
@@ -77,3 +76,4 @@ double computeBlockRThroughput(const MCS
}
} // namespace mca
+} // namespace llvm
More information about the llvm-commits
mailing list