[polly] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#139418)
This commit is contained in:
parent
50e949f3cc
commit
2f69111e1a
@ -992,7 +992,7 @@ DependenceInfoWrapperPass::getDependences(Scop *S,
|
||||
if (It != ScopToDepsMap.end())
|
||||
if (It->second) {
|
||||
if (It->second->getDependenceLevel() == Level)
|
||||
return *It->second.get();
|
||||
return *It->second;
|
||||
}
|
||||
return recomputeDependences(S, Level);
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ void ScopDetection::detect(Function &F) {
|
||||
|
||||
// Prune non-profitable regions.
|
||||
for (auto &DIt : DetectionContextMap) {
|
||||
DetectionContext &DC = *DIt.getSecond().get();
|
||||
DetectionContext &DC = *DIt.getSecond();
|
||||
if (DC.Log.hasErrors())
|
||||
continue;
|
||||
if (!ValidRegions.count(&DC.CurRegion))
|
||||
@ -431,7 +431,7 @@ bool ScopDetection::isMaxRegionInScop(const Region &R, bool Verify) {
|
||||
Entry = std::make_unique<DetectionContext>(const_cast<Region &>(R), AA,
|
||||
/*Verifying=*/false);
|
||||
|
||||
return isValidRegion(*Entry.get());
|
||||
return isValidRegion(*Entry);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1496,7 +1496,7 @@ Region *ScopDetection::expandRegion(Region &R) {
|
||||
std::unique_ptr<DetectionContext> &Entry = DetectionContextMap[P];
|
||||
Entry = std::make_unique<DetectionContext>(*ExpandedRegion, AA,
|
||||
/*Verifying=*/false);
|
||||
DetectionContext &Context = *Entry.get();
|
||||
DetectionContext &Context = *Entry;
|
||||
|
||||
POLLY_DEBUG(dbgs() << "\t\tTrying " << ExpandedRegion->getNameStr()
|
||||
<< "\n");
|
||||
@ -1554,7 +1554,7 @@ static bool regionWithoutLoops(Region &R, LoopInfo &LI) {
|
||||
void ScopDetection::removeCachedResultsRecursively(const Region &R) {
|
||||
for (auto &SubRegion : R) {
|
||||
if (ValidRegions.count(SubRegion.get())) {
|
||||
removeCachedResults(*SubRegion.get());
|
||||
removeCachedResults(*SubRegion);
|
||||
} else
|
||||
removeCachedResultsRecursively(*SubRegion);
|
||||
}
|
||||
@ -1568,7 +1568,7 @@ void ScopDetection::findScops(Region &R) {
|
||||
std::unique_ptr<DetectionContext> &Entry =
|
||||
DetectionContextMap[getBBPairForRegion(&R)];
|
||||
Entry = std::make_unique<DetectionContext>(R, AA, /*Verifying=*/false);
|
||||
DetectionContext &Context = *Entry.get();
|
||||
DetectionContext &Context = *Entry;
|
||||
|
||||
bool DidBailout = true;
|
||||
if (!PollyProcessUnprofitable && regionWithoutLoops(R, LI))
|
||||
@ -1834,7 +1834,7 @@ void ScopDetection::printLocations(Function &F) {
|
||||
|
||||
void ScopDetection::emitMissedRemarks(const Function &F) {
|
||||
for (auto &DIt : DetectionContextMap) {
|
||||
DetectionContext &DC = *DIt.getSecond().get();
|
||||
DetectionContext &DC = *DIt.getSecond();
|
||||
if (DC.Log.hasErrors())
|
||||
emitRejectionRemarks(DIt.getFirst(), DC.Log, ORE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user