[llvm] r346424 - [llvm-mca] Partially revert r346417.
Matt Davis via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 8 10:08:43 PST 2018
Author: mattd
Date: Thu Nov 8 10:08:43 2018
New Revision: 346424
URL: http://llvm.org/viewvc/llvm-project?rev=346424&view=rev
Log:
[llvm-mca] Partially revert r346417.
Restored the llvm:: namespace qualifier on make_unique.
This removes the ambiguity with make_unique.
Modified:
llvm/trunk/tools/llvm-mca/llvm-mca.cpp
Modified: llvm/trunk/tools/llvm-mca/llvm-mca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/llvm-mca.cpp?rev=346424&r1=346423&r2=346424&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/llvm-mca.cpp (original)
+++ llvm/trunk/tools/llvm-mca/llvm-mca.cpp Thu Nov 8 10:08:43 2018
@@ -202,7 +202,8 @@ ErrorOr<std::unique_ptr<ToolOutputFile>>
if (OutputFilename == "")
OutputFilename = "-";
std::error_code EC;
- auto Out = make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::F_None);
+ auto Out =
+ llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::F_None);
if (!EC)
return std::move(Out);
return EC;
@@ -308,7 +309,7 @@ int main(int argc, char **argv) {
TheTarget->createMCInstrAnalysis(MCII.get()));
if (!MCPU.compare("native"))
- MCPU = sys::getHostCPUName();
+ MCPU = llvm::sys::getHostCPUName();
std::unique_ptr<MCSubtargetInfo> STI(
TheTarget->createMCSubtargetInfo(TripleName, MCPU, /* FeaturesStr */ ""));
@@ -433,17 +434,18 @@ int main(int argc, char **argv) {
if (PrintInstructionTables) {
// Create a pipeline, stages, and a printer.
- auto P = make_unique<mca::Pipeline>();
- P->appendStage(make_unique<mca::EntryStage>(S));
- P->appendStage(make_unique<mca::InstructionTables>(SM));
+ auto P = llvm::make_unique<mca::Pipeline>();
+ P->appendStage(llvm::make_unique<mca::EntryStage>(S));
+ P->appendStage(llvm::make_unique<mca::InstructionTables>(SM));
mca::PipelinePrinter Printer(*P);
// Create the views for this pipeline, execute, and emit a report.
if (PrintInstructionInfoView) {
- Printer.addView(
- make_unique<mca::InstructionInfoView>(*STI, *MCII, Insts, *IP));
+ Printer.addView(llvm::make_unique<mca::InstructionInfoView>(
+ *STI, *MCII, Insts, *IP));
}
- Printer.addView(make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
+ Printer.addView(
+ llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
if (!runPipeline(*P))
return 1;
@@ -457,31 +459,32 @@ int main(int argc, char **argv) {
mca::PipelinePrinter Printer(*P);
if (PrintSummaryView)
- Printer.addView(make_unique<mca::SummaryView>(SM, Insts, Width));
+ Printer.addView(llvm::make_unique<mca::SummaryView>(SM, Insts, Width));
if (PrintInstructionInfoView)
Printer.addView(
- make_unique<mca::InstructionInfoView>(*STI, *MCII, Insts, *IP));
+ llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, Insts, *IP));
if (PrintDispatchStats)
- Printer.addView(make_unique<mca::DispatchStatistics>());
+ Printer.addView(llvm::make_unique<mca::DispatchStatistics>());
if (PrintSchedulerStats)
- Printer.addView(make_unique<mca::SchedulerStatistics>(*STI));
+ Printer.addView(llvm::make_unique<mca::SchedulerStatistics>(*STI));
if (PrintRetireStats)
- Printer.addView(make_unique<mca::RetireControlUnitStatistics>());
+ Printer.addView(llvm::make_unique<mca::RetireControlUnitStatistics>());
if (PrintRegisterFileStats)
- Printer.addView(make_unique<mca::RegisterFileStatistics>(*STI));
+ Printer.addView(llvm::make_unique<mca::RegisterFileStatistics>(*STI));
if (PrintResourcePressureView)
- Printer.addView(make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
+ Printer.addView(
+ llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
if (PrintTimelineView) {
unsigned TimelineIterations =
TimelineMaxIterations ? TimelineMaxIterations : 10;
- Printer.addView(make_unique<mca::TimelineView>(
+ Printer.addView(llvm::make_unique<mca::TimelineView>(
*STI, *IP, Insts, std::min(TimelineIterations, S.getNumIterations()),
TimelineMaxCycles));
}
More information about the llvm-commits
mailing list