forked from OSchip/llvm-project
[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:
parent
67d0488934
commit
15ecfbf1f6
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue