mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[llvm-mca] Remove a couple of using directives and a bunch of redundant namespace llvm prefixes. NFC
llvm-svn: 344916
This commit is contained in:
parent
bc7384fc93
commit
aea440496b
@ -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) const {
|
||||
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 Description, SMLoc Loc) {
|
||||
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) {
|
||||
|
@ -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);
|
||||
|
@ -33,7 +33,7 @@ void DispatchStatistics::onEvent(const HWInstructionEvent &Event) {
|
||||
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 - "
|
||||
|
@ -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};
|
||||
|
@ -24,7 +24,7 @@ void RetireControlUnitStatistics::onEvent(const HWInstructionEvent &Event) {
|
||||
++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 - "
|
||||
|
@ -121,7 +121,7 @@ void SchedulerStatistics::printSchedulerUsage(raw_ostream &OS) const {
|
||||
FOS.flush();
|
||||
}
|
||||
|
||||
void SchedulerStatistics::printView(llvm::raw_ostream &OS) const {
|
||||
void SchedulerStatistics::printView(raw_ostream &OS) const {
|
||||
printSchedulerStats(OS);
|
||||
printSchedulerUsage(OS);
|
||||
}
|
||||
|
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user