diff options
Diffstat (limited to 'lib/MCA/Context.cpp')
-rw-r--r-- | lib/MCA/Context.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/MCA/Context.cpp b/lib/MCA/Context.cpp index f0e8dfab8680..0160e1f9f787 100644 --- a/lib/MCA/Context.cpp +++ b/lib/MCA/Context.cpp @@ -28,24 +28,23 @@ namespace llvm { namespace mca { std::unique_ptr<Pipeline> -Context::createDefaultPipeline(const PipelineOptions &Opts, InstrBuilder &IB, - SourceMgr &SrcMgr) { +Context::createDefaultPipeline(const PipelineOptions &Opts, SourceMgr &SrcMgr) { const MCSchedModel &SM = STI.getSchedModel(); // Create the hardware units defining the backend. - auto RCU = llvm::make_unique<RetireControlUnit>(SM); - auto PRF = llvm::make_unique<RegisterFile>(SM, MRI, Opts.RegisterFileSize); - auto LSU = llvm::make_unique<LSUnit>(SM, Opts.LoadQueueSize, + auto RCU = std::make_unique<RetireControlUnit>(SM); + auto PRF = std::make_unique<RegisterFile>(SM, MRI, Opts.RegisterFileSize); + auto LSU = std::make_unique<LSUnit>(SM, Opts.LoadQueueSize, Opts.StoreQueueSize, Opts.AssumeNoAlias); - auto HWS = llvm::make_unique<Scheduler>(SM, *LSU); + auto HWS = std::make_unique<Scheduler>(SM, *LSU); // Create the pipeline stages. - auto Fetch = llvm::make_unique<EntryStage>(SrcMgr); - auto Dispatch = llvm::make_unique<DispatchStage>(STI, MRI, Opts.DispatchWidth, + auto Fetch = std::make_unique<EntryStage>(SrcMgr); + auto Dispatch = std::make_unique<DispatchStage>(STI, MRI, Opts.DispatchWidth, *RCU, *PRF); auto Execute = - llvm::make_unique<ExecuteStage>(*HWS, Opts.EnableBottleneckAnalysis); - auto Retire = llvm::make_unique<RetireStage>(*RCU, *PRF); + std::make_unique<ExecuteStage>(*HWS, Opts.EnableBottleneckAnalysis); + auto Retire = std::make_unique<RetireStage>(*RCU, *PRF, *LSU); // Pass the ownership of all the hardware units to this Context. addHardwareUnit(std::move(RCU)); @@ -54,10 +53,10 @@ Context::createDefaultPipeline(const PipelineOptions &Opts, InstrBuilder &IB, addHardwareUnit(std::move(HWS)); // Build the pipeline. - auto StagePipeline = llvm::make_unique<Pipeline>(); + auto StagePipeline = std::make_unique<Pipeline>(); StagePipeline->appendStage(std::move(Fetch)); if (Opts.MicroOpQueueSize) - StagePipeline->appendStage(llvm::make_unique<MicroOpQueueStage>( + StagePipeline->appendStage(std::make_unique<MicroOpQueueStage>( Opts.MicroOpQueueSize, Opts.DecodersThroughput)); StagePipeline->appendStage(std::move(Dispatch)); StagePipeline->appendStage(std::move(Execute)); |