[llvm] r340887 - [llvm-mca] Move the initialization of Pipeline. NFC.
Matt Davis via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 28 17:34:33 PDT 2018
Author: mattd
Date: Tue Aug 28 17:34:32 2018
New Revision: 340887
URL: http://llvm.org/viewvc/llvm-project?rev=340887&view=rev
Log:
[llvm-mca] Move the initialization of Pipeline. NFC.
Code cleanup to make the pipeline creation routine easier to read.
Modified:
llvm/trunk/tools/llvm-mca/lib/Context.cpp
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=340887&r1=340886&r2=340887&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/lib/Context.cpp (original)
+++ llvm/trunk/tools/llvm-mca/lib/Context.cpp Tue Aug 28 17:34:32 2018
@@ -40,8 +40,7 @@ Context::createDefaultPipeline(const Pip
Opts.AssumeNoAlias);
auto HWS = llvm::make_unique<Scheduler>(SM, LSU.get());
- // Create the pipeline and its stages.
- auto StagePipeline = llvm::make_unique<Pipeline>();
+ // Create the pipeline stages.
auto Fetch = llvm::make_unique<FetchStage>(IB, SrcMgr);
auto Dispatch = llvm::make_unique<DispatchStage>(
STI, MRI, Opts.RegisterFileSize, Opts.DispatchWidth, *RCU, *PRF);
@@ -55,6 +54,7 @@ Context::createDefaultPipeline(const Pip
addHardwareUnit(std::move(HWS));
// Build the pipeline.
+ auto StagePipeline = llvm::make_unique<Pipeline>();
StagePipeline->appendStage(std::move(Fetch));
StagePipeline->appendStage(std::move(Dispatch));
StagePipeline->appendStage(std::move(Execute));
More information about the llvm-commits
mailing list