From 15ecfbf1f6bb73ab59ae1e425ad2e8453c9b7f6c Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Wed, 29 Aug 2018 00:34:32 +0000 Subject: [PATCH] [llvm-mca] Move the initialization of Pipeline. NFC. Code cleanup to make the pipeline creation routine easier to read. llvm-svn: 340887 --- llvm/tools/llvm-mca/lib/Context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/tools/llvm-mca/lib/Context.cpp b/llvm/tools/llvm-mca/lib/Context.cpp index 31c09dce9126..d2cb27fecec0 100644 --- a/llvm/tools/llvm-mca/lib/Context.cpp +++ b/llvm/tools/llvm-mca/lib/Context.cpp @@ -40,8 +40,7 @@ Context::createDefaultPipeline(const PipelineOptions &Opts, InstrBuilder &IB, Opts.AssumeNoAlias); auto HWS = llvm::make_unique(SM, LSU.get()); - // Create the pipeline and its stages. - auto StagePipeline = llvm::make_unique(); + // Create the pipeline stages. auto Fetch = llvm::make_unique(IB, SrcMgr); auto Dispatch = llvm::make_unique( STI, MRI, Opts.RegisterFileSize, Opts.DispatchWidth, *RCU, *PRF); @@ -55,6 +54,7 @@ Context::createDefaultPipeline(const PipelineOptions &Opts, InstrBuilder &IB, addHardwareUnit(std::move(HWS)); // Build the pipeline. + auto StagePipeline = llvm::make_unique(); StagePipeline->appendStage(std::move(Fetch)); StagePipeline->appendStage(std::move(Dispatch)); StagePipeline->appendStage(std::move(Execute));