Skip to content

Commit baca235

Browse files
committed
[region-isolation] Change load [copy]/load_borrow to just use SILIsolationInfo::get instead of computing actor isolation by hand.
Just more recoring on top of SILIsolationInfo::get.
1 parent 2a7714a commit baca235

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/SILOptimizer/Analysis/RegionAnalysis.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3336,12 +3336,8 @@ TrackableValue RegionAnalysisValueMap::getTrackableValue(
33363336

33373337
auto storage = AccessStorageWithBase::compute(svi->getOperand(0));
33383338
if (storage.storage) {
3339-
if (auto *reai = dyn_cast<RefElementAddrInst>(storage.base)) {
3340-
auto *nomDecl = reai->getOperand()
3341-
->getType()
3342-
.getNominalOrBoundGenericNominal();
3343-
iter.first->getSecond().mergeIsolationRegionInfo(
3344-
SILIsolationInfo::getActorIsolated(reai->getOperand(), nomDecl));
3339+
if (auto isolation = SILIsolationInfo::get(storage.base)) {
3340+
iter.first->getSecond().mergeIsolationRegionInfo(isolation);
33453341
}
33463342
}
33473343
}

0 commit comments

Comments
 (0)