[llvm-mca] Move the initialization of Pipeline. NFC.

Code cleanup to make the pipeline creation routine easier to read.

llvm-svn: 340887
This commit is contained in:
Matt Davis 2018-08-29 00:34:32 +00:00
parent 67d0488934
commit 15ecfbf1f6
1 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,7 @@ Context::createDefaultPipeline(const PipelineOptions &Opts, InstrBuilder &IB,
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 PipelineOptions &Opts, InstrBuilder &IB,
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));