Skip to content

Commit 9e71970

Browse files
Matt DavisMatt Davis
Matt Davis
authored and
Matt Davis
committed
[llvm-mca] Partially revert r346417.
Restored the llvm:: namespace qualifier on make_unique. This removes the ambiguity with make_unique. llvm-svn: 346424
1 parent 6979b70 commit 9e71970

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

llvm/tools/llvm-mca/llvm-mca.cpp

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ ErrorOr<std::unique_ptr<ToolOutputFile>> getOutputStream() {
202202
if (OutputFilename == "")
203203
OutputFilename = "-";
204204
std::error_code EC;
205-
auto Out = make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::F_None);
205+
auto Out =
206+
llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::F_None);
206207
if (!EC)
207208
return std::move(Out);
208209
return EC;
@@ -308,7 +309,7 @@ int main(int argc, char **argv) {
308309
TheTarget->createMCInstrAnalysis(MCII.get()));
309310

310311
if (!MCPU.compare("native"))
311-
MCPU = sys::getHostCPUName();
312+
MCPU = llvm::sys::getHostCPUName();
312313

313314
std::unique_ptr<MCSubtargetInfo> STI(
314315
TheTarget->createMCSubtargetInfo(TripleName, MCPU, /* FeaturesStr */ ""));
@@ -433,17 +434,18 @@ int main(int argc, char **argv) {
433434

434435
if (PrintInstructionTables) {
435436
// Create a pipeline, stages, and a printer.
436-
auto P = make_unique<mca::Pipeline>();
437-
P->appendStage(make_unique<mca::EntryStage>(S));
438-
P->appendStage(make_unique<mca::InstructionTables>(SM));
437+
auto P = llvm::make_unique<mca::Pipeline>();
438+
P->appendStage(llvm::make_unique<mca::EntryStage>(S));
439+
P->appendStage(llvm::make_unique<mca::InstructionTables>(SM));
439440
mca::PipelinePrinter Printer(*P);
440441

441442
// Create the views for this pipeline, execute, and emit a report.
442443
if (PrintInstructionInfoView) {
443-
Printer.addView(
444-
make_unique<mca::InstructionInfoView>(*STI, *MCII, Insts, *IP));
444+
Printer.addView(llvm::make_unique<mca::InstructionInfoView>(
445+
*STI, *MCII, Insts, *IP));
445446
}
446-
Printer.addView(make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
447+
Printer.addView(
448+
llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
447449

448450
if (!runPipeline(*P))
449451
return 1;
@@ -457,31 +459,32 @@ int main(int argc, char **argv) {
457459
mca::PipelinePrinter Printer(*P);
458460

459461
if (PrintSummaryView)
460-
Printer.addView(make_unique<mca::SummaryView>(SM, Insts, Width));
462+
Printer.addView(llvm::make_unique<mca::SummaryView>(SM, Insts, Width));
461463

462464
if (PrintInstructionInfoView)
463465
Printer.addView(
464-
make_unique<mca::InstructionInfoView>(*STI, *MCII, Insts, *IP));
466+
llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, Insts, *IP));
465467

466468
if (PrintDispatchStats)
467-
Printer.addView(make_unique<mca::DispatchStatistics>());
469+
Printer.addView(llvm::make_unique<mca::DispatchStatistics>());
468470

469471
if (PrintSchedulerStats)
470-
Printer.addView(make_unique<mca::SchedulerStatistics>(*STI));
472+
Printer.addView(llvm::make_unique<mca::SchedulerStatistics>(*STI));
471473

472474
if (PrintRetireStats)
473-
Printer.addView(make_unique<mca::RetireControlUnitStatistics>());
475+
Printer.addView(llvm::make_unique<mca::RetireControlUnitStatistics>());
474476

475477
if (PrintRegisterFileStats)
476-
Printer.addView(make_unique<mca::RegisterFileStatistics>(*STI));
478+
Printer.addView(llvm::make_unique<mca::RegisterFileStatistics>(*STI));
477479

478480
if (PrintResourcePressureView)
479-
Printer.addView(make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
481+
Printer.addView(
482+
llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
480483

481484
if (PrintTimelineView) {
482485
unsigned TimelineIterations =
483486
TimelineMaxIterations ? TimelineMaxIterations : 10;
484-
Printer.addView(make_unique<mca::TimelineView>(
487+
Printer.addView(llvm::make_unique<mca::TimelineView>(
485488
*STI, *IP, Insts, std::min(TimelineIterations, S.getNumIterations()),
486489
TimelineMaxCycles));
487490
}

0 commit comments

Comments
 (0)