diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp index 8388f9bc15b69..440f47d45a8ab 100644 --- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp +++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp @@ -740,7 +740,7 @@ bool HotColdSplittingLegacyPass::runOnModule(Module &M) { std::function GetORE = [&ORE](Function &F) -> OptimizationRemarkEmitter & { ORE.reset(new OptimizationRemarkEmitter(&F)); - return *ORE.get(); + return *ORE; }; auto LookupAC = [this](Function &F) -> AssumptionCache * { if (auto *ACT = getAnalysisIfAvailable()) @@ -772,7 +772,7 @@ HotColdSplittingPass::run(Module &M, ModuleAnalysisManager &AM) { std::function GetORE = [&ORE](Function &F) -> OptimizationRemarkEmitter & { ORE.reset(new OptimizationRemarkEmitter(&F)); - return *ORE.get(); + return *ORE; }; ProfileSummaryInfo *PSI = &AM.getResult(M); diff --git a/llvm/lib/Transforms/IPO/IROutliner.cpp b/llvm/lib/Transforms/IPO/IROutliner.cpp index 51e1f99bad218..d11fefcdefc80 100644 --- a/llvm/lib/Transforms/IPO/IROutliner.cpp +++ b/llvm/lib/Transforms/IPO/IROutliner.cpp @@ -2958,7 +2958,7 @@ bool IROutlinerLegacyPass::runOnModule(Module &M) { std::unique_ptr ORE; auto GORE = [&ORE](Function &F) -> OptimizationRemarkEmitter & { ORE.reset(new OptimizationRemarkEmitter(&F)); - return *ORE.get(); + return *ORE; }; auto GTTI = [this](Function &F) -> TargetTransformInfo & { @@ -2989,7 +2989,7 @@ PreservedAnalyses IROutlinerPass::run(Module &M, ModuleAnalysisManager &AM) { std::function GORE = [&ORE](Function &F) -> OptimizationRemarkEmitter & { ORE.reset(new OptimizationRemarkEmitter(&F)); - return *ORE.get(); + return *ORE; }; if (IROutliner(GTTI, GIRSI, GORE).run(M)) diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp index ce574eb462966..67b1896fe9cac 100644 --- a/llvm/lib/Transforms/IPO/PartialInlining.cpp +++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp @@ -742,7 +742,7 @@ BranchProbability PartialInlinerImpl::getOutliningCallBBRelativeFreq( auto OutlineRegionRelFreq = BranchProbability::getBranchProbability( OutliningCallFreq.getFrequency(), EntryFreq.getFrequency()); - if (hasProfileData(*Cloner.OrigFunc, *Cloner.ClonedOI.get())) + if (hasProfileData(*Cloner.OrigFunc, *Cloner.ClonedOI)) return OutlineRegionRelFreq; // When profile data is not available, we need to be conservative in diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp index 29d0e3e8bd6e9..bda7a46db142f 100644 --- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp +++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp @@ -2080,7 +2080,7 @@ bool ControlHeightReductionLegacyPass::runOnFunction(Function &F) { RegionInfo &RI = getAnalysis().getRegionInfo(); std::unique_ptr OwnedORE = std::make_unique(&F); - return CHR(F, BFI, DT, PSI, RI, *OwnedORE.get()).run(); + return CHR(F, BFI, DT, PSI, RI, *OwnedORE).run(); } namespace llvm { diff --git a/llvm/lib/Transforms/Scalar/LoopSink.cpp b/llvm/lib/Transforms/Scalar/LoopSink.cpp index c7b37a313b5b5..e3d8dd7deef5b 100644 --- a/llvm/lib/Transforms/Scalar/LoopSink.cpp +++ b/llvm/lib/Transforms/Scalar/LoopSink.cpp @@ -381,7 +381,7 @@ PreservedAnalyses LoopSinkPass::run(Function &F, FunctionAnalysisManager &FAM) { std::unique_ptr CurAST; if (!EnableMSSAInLoopSink) { CurAST = std::make_unique(AA); - computeAliasSet(L, *Preheader, *CurAST.get()); + computeAliasSet(L, *Preheader, *CurAST); } // Note that we don't pass SCEV here because it is only used to invalidate @@ -436,7 +436,7 @@ struct LegacyLoopSinkPass : public LoopPass { MSSA = &getAnalysis().getMSSA(); else { CurAST = std::make_unique(AA); - computeAliasSet(*L, *Preheader, *CurAST.get()); + computeAliasSet(*L, *Preheader, *CurAST); } bool Changed = sinkLoopInvariantInstructions( diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 36db38f6fbf5b..f584f8fbaf86c 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -3371,7 +3371,7 @@ void BoUpSLP::reorderTopToBottom() { for_each(VectorizableTree, [this, &VFToOrderedEntries, &GathersToOrders]( const std::unique_ptr &TE) { if (Optional CurrentOrder = - getReorderingData(*TE.get(), /*TopToBottom=*/true)) { + getReorderingData(*TE, /*TopToBottom=*/true)) { // Do not include ordering for nodes used in the alt opcode vectorization, // better to reorder them during bottom-to-top stage. If follow the order // here, it causes reordering of the whole graph though actually it is @@ -3568,7 +3568,7 @@ void BoUpSLP::reorderBottomToTop(bool IgnoreReorder) { if (TE->State != TreeEntry::Vectorize) NonVectorized.push_back(TE.get()); if (Optional CurrentOrder = - getReorderingData(*TE.get(), /*TopToBottom=*/false)) { + getReorderingData(*TE, /*TopToBottom=*/false)) { OrderedEntries.insert(TE.get()); if (TE->State != TreeEntry::Vectorize) GathersToOrders.try_emplace(TE.get(), *CurrentOrder); @@ -4131,7 +4131,7 @@ void BoUpSLP::buildTree_rec(ArrayRef VL, unsigned Depth, if (!BSRef) BSRef = std::make_unique(BB); - BlockScheduling &BS = *BSRef.get(); + BlockScheduling &BS = *BSRef; Optional Bundle = BS.tryScheduleBundle(VL, this, S); #ifdef EXPENSIVE_CHECKS @@ -6095,7 +6095,7 @@ InstructionCost BoUpSLP::getTreeCost(ArrayRef VectorizedVals) { unsigned BundleWidth = VectorizableTree[0]->Scalars.size(); for (unsigned I = 0, E = VectorizableTree.size(); I < E; ++I) { - TreeEntry &TE = *VectorizableTree[I].get(); + TreeEntry &TE = *VectorizableTree[I]; InstructionCost C = getEntryCost(&TE, VectorizedVals); Cost += C;